2 // System.Data.Common.DataAdapter
5 // Rodrigo Moya (rodrigo@ximian.com)
10 using System.ComponentModel;
13 namespace System.Data.Common
16 /// Represents a set of data commands and a database connection that are used to fill the DataSet and update the data source.
18 public abstract class DataAdapter : Component // , IDataAdapter
20 private bool acceptChangesDuringFill;
21 private bool continueUpdateOnError;
22 private MissingMappingAction missingMappingAction;
23 private MissingSchemaAction missingSchemaAction;
24 private DataTableMappingCollection tableMappings;
26 protected DataAdapter () {
27 acceptChangesDuringFill = false;
28 continueUpdateOnError = false;
29 missingMappingAction = MissingMappingAction.Error;
30 missingSchemaAction = MissingSchemaAction.Error;
34 public abstract int Fill (DataSet dataSet);
36 public abstract DataTable[] FillSchema (DataSet dataSet,
37 SchemaType schemaType);
39 public abstract IDataParameter[] GetFillParameters ();
41 public abstract int Update (DataSet dataSet);
43 protected virtual DataAdapter CloneInternals ()
45 throw new NotImplementedException ();
48 protected virtual DataTableMappingCollection CreateTableMappings ()
50 throw new NotImplementedException ();
53 protected virtual bool ShouldSerializeTableMappings ()
55 throw new NotImplementedException ();
58 public bool AcceptChangesDuringFill {
60 return acceptChangesDuringFill;
63 acceptChangesDuringFill = value;
67 public bool ContinueUpdateOnError {
69 return continueUpdateOnError;
72 continueUpdateOnError = value;
76 public MissingMappingAction MissingMappingAction {
78 return missingMappingAction;
81 missingMappingAction = value;
85 public MissingSchemaAction MissingSchemaAction {
87 return missingSchemaAction;
90 missingSchemaAction = value;
94 public DataTableMappingCollection TableMappings {
96 if (tableMappings == null)
97 tableMappings = CreateTableMappings ();