System.Data
[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]
1.0.3300.0
1.0.5000.0
2.0.0.0
Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.
System.Data.Common.DbDataAdapter
System.ComponentModel.ToolboxItem("Microsoft.VSDesigner.Data.VS.OleDbDataAdapterToolboxItem, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.Designer("Microsoft.VSDesigner.Data.VS.OleDbDataAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")
System.ComponentModel.DefaultEvent("RowUpdated")
The serves as a bridge between a and data source for retrieving and saving data. The provides this bridge by using to load data from the data source into the , and using to send changes made in the back to the data source.
When the fills a , it will create the appropriate tables and columns for the returned data if they do not already exist. However, primary key information is not included in the implicitly created schema unless the property is set to . You may also have the create the schema of the , including primary key information, before filling it with data using . For more information, see Adding Existing Constraints to a DataSet.
Note that some OLE DB providers, including the MSDataShape provider, do not return base table or primary key information. Therefore, the cannot correctly set the property on any created . In these cases you should explicitly specify primary keys for tables in the .
The also includes the , , , , and properties to facilitate the loading and updating of data.
When you create an instance of , properties are set to their initial values. For a list of these values, see the constructor.
Represents a set of data commands and a database connection that are used to fill the and update the data source.
Constructor
When you create an instance of , the following read/write properties are set to the following initial values.
-
Properties
Initial value
-
MissingMappingAction.Passthrough
-
MissingSchemaAction.Add
You can change the value of any of these properties through a separate call to the property.
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Constructor
This implementation of the constructor sets the property to the value specified in the parameter.
When you create an instance of , the following read/write properties are set to the following initial values.
-
Properties
Initial value
-
MissingMappingAction.Passthrough
-
MissingSchemaAction.Add
You can change the value of any of these properties through a separate call to the property.
Initializes a new instance of the class with the specified as the property.
An that is a SELECT statement or stored procedure, and is set as the property of the .
1.0.5000.0
2.0.0.0
Constructor
This implementation of the opens and closes an if it is not already open. This can be useful in an application that must call the method for two or more objects. If the is already open, you must explicitly call or Dispose to close it.
When you create an instance of , the following read/write properties are set to the following initial values.
-
Properties
Initial value
-
MissingMappingAction.Passthrough
-
MissingSchemaAction.Add
You can change the value of either of these properties through a separate call to the property.
Initializes a new instance of the class with a .
A string that is an SQL SELECT statement or stored procedure to be used by the property of the .
An that represents the connection.
1.0.5000.0
2.0.0.0
Constructor
This overload of the constructor uses the parameter to set the property. However, it does not open the connection. You still must explicitly open the connection.
When you create an instance of , the following read/write properties are set to the following initial values.
-
Properties
Initial value
-
MissingMappingAction.Passthrough
-
MissingSchemaAction.Add
You can change the value of any of these properties through a separate call to the property.
Initializes a new instance of the class with a .
A string that is an SQL SELECT statement or stored procedure to be used by the property of the .
The connection string.
1.0.5000.0
2.0.0.0
Method
System.Data.Common.RowUpdatedEventArgs
To be added: an object of type 'Data.DataRow'
To be added: an object of type 'Data.IDbCommand'
To be added: an object of type 'Data.StatementType'
To be added: an object of type 'Data.Common.DataTableMapping'
To be added
To be added: an object of type 'Data.Common.RowUpdatedEventArgs'
To be added
1.0.5000.0
2.0.0.0
Method
System.Data.Common.RowUpdatingEventArgs
To be added: an object of type 'Data.DataRow'
To be added: an object of type 'Data.IDbCommand'
To be added: an object of type 'Data.StatementType'
To be added: an object of type 'Data.Common.DataTableMapping'
To be added
To be added: an object of type 'Data.Common.RowUpdatingEventArgs'
To be added
1.0.5000.0
2.0.0.0
Property
System.Data.OleDb.OleDbCommand
To be added: an object of type 'OleDbCommand'
During , if this property is not set and primary key information is present in the , the can be generated automatically if you set the property and use the . Then, any additional commands that you do not set are generated by the . This generation logic requires key column information to be present in the . For more information, see Automatically Generated Commands.
When is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object.
Gets or sets an SQL statement or stored procedure for deleting records from the data set.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.DefaultValue(null)
Method
1.0.5000.0
System.Void
To be added.
To be added.
To be added.
Method
System.Int32
The link between ActiveX Data Objects (ADO) and ADO.NET is a one-way operation in that you can copy data from ADO to the , but any updates to the data must be handled by ADO.NET.
This overload of the method does not close the input Recordset on completion of the operation.
When handling batch SQL statements that return multiple results, this implementation of and for the OLE DB.NET Framework Data Provider retrieves schema information for only the first result.
The operation adds the rows to the specified destination object in the , creating the object if it does not already exist. When you create a object, the operation ordinarily creates only column name metadata. However, if the property is set to AddWithKey, appropriate primary keys and constraints are also created.
You can use the method multiple times on the same . If a primary key exists, incoming rows are merged with matching rows that already exist. If no primary key exists, incoming rows are appended to the . If primary key information is present, any duplicate rows are reconciled and only appear one time in the that corresponds to the . Primary key information may be set either through , by specifying the property of the , or by setting the property to AddWithKey.
If the returns the results of an OUTER JOIN, the DataAdapter does not set a value for the resulting . You must explicitly define the primary key to make sure that duplicate rows are resolved correctly. For more information, see Defining a Primary Key for a Table.
To function correctly with the .NET Framework Data Provider for OLE DB, AddWithKey requires that the native OLE DB provider obtains required primary key information by setting the DBPROP_UNIQUEROWS property, and then determines which columns are primary key columns by examining DBCOLUMN_KEYCOLUMN in the IColumnsRowset. Alternatively the user may explicitly set the primary key constraints on each . This makes sure that incoming records that match existing records are updated instead of appended.
If the encounters duplicate columns while populating a , it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. Empty column names are added to the , using an empty string for the first column, followed by "1", "2", "3", and so on for the subsequent empty columns.
Values in ADO Recordset or Record objects are converted to common language runtime types for storage in the .
This overload of the method does not implicitly call Close on the ADO object when the fill operation is complete. Therefore, always call Close when you are finished using ADO Recordset or Record objects. This makes sure that the underlying connection to a data source is released in a timely manner, and also prevents possible access violations because of unmanaged ADO objects being reclaimed by garbage collection when existing references still exist.
When you call the TableMappings.Add method on a DataAdapter and you explicitly map the source table parameter to an empty string, the dataset is successfully filled using the source table, but the dataset will be populated with nothing. For example, in the following example, rDataSet will be populated with nothing.
rAdapter.TableMappings.Add("source table", "");
rAdapter.Fill(rDataSet, "source table");
This example shows how you can skip a result when dealing with multiple results.
The following example uses an to fill a using an ADO Recordset. This example assumes that you have created an ADO Recordset.
Dim custDA As OleDbDataAdapter = New OleDbDataAdapter()
Dim custDS As DataSet = New DataSet
Dim custTable As DataTable = New DataTable("Customers")
custTable.Columns.Add("CustomerID", Type.GetType("System.String"))
custTable.Columns.Add("CompanyName", Type.GetType("System.String"))
custDS.Tables.Add(custTable)
'Use ADO objects from ADO library (msado15.dll) imported
' as.NET library ADODB.dll using TlbImp.exe
Dim adoConn As ADODB.Connection = New ADODB.Connection()
Dim adoRS As ADODB.Recordset = New ADODB.Recordset()
adoConn.Open("Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;", "", "", -1)
adoRS.Open("SELECT CustomerID, CompanyName FROM Customers", adoConn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly, 1)
custDA.Fill(custTable, adoRS)
adoRS.Close()
adoConn.Close()
OleDbDataAdapter custDA = new OleDbDataAdapter();
DataSet custDS = new DataSet();
DataTable custTable = new DataTable("Customers");
custTable.Columns.Add("CustomerID", typeof(String));
custTable.Columns.Add("CompanyName", typeof(String));
custDS.Tables.Add(custTable);
//Use ADO objects from ADO library (msado15.dll) imported
// as.NET library ADODB.dll using TlbImp.exe
ADODB.Connection adoConn = new ADODB.Connection();
ADODB.Recordset adoRS = new ADODB.Recordset();
adoConn.Open("Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;", "", "", -1);
adoRS.Open("SELECT CustomerID, CompanyName FROM Customers", adoConn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly, 1);
custDA.Fill(custTable, adoRS);
adoRS.Close();
adoConn.Close();
Adds or refreshes rows in a to match those in an ADO Recordset or Record object using the specified and ADO objects.
The number of rows successfully refreshed to the . This does not include rows affected by statements that do not return rows.
A to fill with records and, if it is required, schema.
An ADO Recordset or Record object.
1.0.5000.0
2.0.0.0
Method
System.Int32
The link between ActiveX Data Objects (ADO) and ADO.NET is a one-way operation in that you can copy data from ADO to the , but any updates to the data must be handled by ADO.NET.
The method iterates through multiple results by calling the NextRecordset method on the Recordset, closing the input Recordset on completion of the operation.
The operation adds the rows to the specified destination object in the , creating the object if it does not already exist. When you create a object, the operation ordinarily creates only column name metadata. However, if the property is set to AddWithKey, appropriate primary keys and constraints are also created.
If primary key information is present, any duplicate rows are reconciled and only appear one time in the that corresponds to the . Primary key information may be set either through , by specifying the property of the , or by setting the property to AddWithKey.
To function correctly with the .NET Framework Data Provider for OLE DB, AddWithKey requires the native OLE DB provider to obtain required primary key information by setting the DBPROP_UNIQUEROWS property, and then determine which columns are primary key columns by examining DBCOLUMN_KEYCOLUMN in the IColumnsRowset. Alternatively the user may explicitly set the primary key constraints on each . This ensures that incoming records that match existing records are updated instead of appended.
If the returns the results of an OUTER JOIN, the DataAdapter does not set a value for the resulting . You must explicitly define the primary key to make sure that duplicate rows are resolved correctly. For more information, see Defining a Primary Key for a Table.
If the Recordset is closed before the starting of the operation, no error results. This is required for handling of multiple results, because queries that do not return rows are indicated by a closed Recordset. The just calls NextRecordset on the closed Recordset and continues processing.
If an error is encountered while populating the data set, rows added before the occurrence of the error remain in the . The rest of the operation is aborted.
If the object encounters duplicate columns while populating a , it generates names for the subsequent columns, using the pattern "columnname1", "columnname2", "columnname3", and so on. If the incoming data contains unnamed columns, they are placed in the according to the pattern "Column1", "Column2", and so on. When multiple result sets are added to the each result set is placed in a separate table. Additional result sets are named by appending integral values to the specified table name (for example, "Table", "Table1", "Table2", and so on.). Applications that use column and table names should make sure that conflicts with these naming patterns does not occur.
Values in ADO Recordset or Record objects are converted to common language runtime types for storage in the .
This overload of the method implicitly calls Close on the ADO object when the fill operation is complete.
The following example uses an to fill a using an ADO Recordset that is an ADO Record object. This example assumes that you have created an ADO RecordSet and Record object.
Dim custDA As OleDbDataAdapter = New OleDbDataAdapter()
Dim custDS As DataSet = New DataSet
'Use ADO objects from ADO library (msado15.dll) imported
' as.NET library ADODB.dll using TlbImp.exe
Dim adoConn As ADODB.Connection = New ADODB.Connection()
Dim adoRS As ADODB.Recordset = New ADODB.Recordset()
adoConn.Open("Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;", "", "", -1)
adoRS.Open("SELECT * FROM Customers", adoConn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly, 1)
custDA.Fill(custDS, adoRS, "Customers")
adoConn.Close()
OleDbDataAdapter custDA = new OleDbDataAdapter();
DataSet custDS = new DataSet();
//Use ADO objects from ADO library (msado15.dll) imported
// as.NET library ADODB.dll using TlbImp.exe
ADODB.Connection adoConn = new ADODB.Connection();
ADODB.Recordset adoRS = new ADODB.Recordset();
adoConn.Open("Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;", "", "", -1);
adoRS.Open("SELECT * FROM Customers", adoConn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly, 1);
custDA.Fill(custDS, adoRS, "Customers");
adoConn.Close();
Adds or refreshes rows in the to match those in an ADO Recordset or Record object using the specified , ADO object, and source table name.
The number of rows successfully added to or refreshed in the . This does not include rows affected by statements that do not return rows.
A to fill with records and, if it is required, schema.
An ADO Recordset or Record object.
The source table used for the table mappings.
1.0.5000.0
2.0.0.0
Property
System.Data.OleDb.OleDbCommand
To be added: an object of type 'OleDbCommand'
During , if this property is not set and primary key information is present in the , the can be generated automatically if you set the property and use the . Then, any additional commands that you do not set are generated by the . This generation logic requires key column information to be present in the . For more information, see Automatically Generated Commands.
When is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object.
If execution of this command returns rows, these rows may be added to the depending on how you set the property of the object.
Gets or sets an SQL statement or stored procedure used to insert new records into the data source.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.DefaultValue(null)
Method
System.Void
To be added: an object of type 'Data.Common.RowUpdatedEventArgs'
To be added
To be added
1.0.5000.0
2.0.0.0
Method
System.Void
To be added: an object of type 'Data.Common.RowUpdatingEventArgs'
To be added
To be added
1.0.5000.0
2.0.0.0
Event
System.Data.OleDb.OleDbRowUpdatedEventHandler
When you use , there are two events that occur per data row updated. The order of execution is as follows:
-
The values in the are moved to the parameter values.
-
The event is raised.
-
The command executes.
-
If the command is set to FirstReturnedRecord, the first returned result is placed in the .
-
If there are output parameters, they are placed in the .
-
The event is raised.
-
is called.
Occurs during after a command is executed against the data source. The attempt to update is made. Therefore, the event occurs.
1.0.5000.0
2.0.0.0
Event
System.Data.OleDb.OleDbRowUpdatingEventHandler
When you use , there are two events that occur per data row updated. The order of execution is as follows:
-
The values in the are moved to the parameter values.
-
The event is raised.
-
The command executes.
-
If the command is set to FirstReturnedRecord, the first returned result is placed in the .
-
If there are output parameters, they are placed in the .
-
The event is raised.
-
is called.
Occurs during before a command is executed against the data source. The attempt to update is made. Therefore, the event occurs.
1.0.5000.0
2.0.0.0
Property
System.Data.OleDb.OleDbCommand
To be added: an object of type 'OleDbCommand'
When is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object.
If the returns no rows, no tables are added to the , and no exception is raised.
Gets or sets an SQL statement or stored procedure used to select records in the data source.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.DefaultValue(null)
Property
1.0.5000.0
2.0.0.0
System.Data.ITableMappingCollection
To be added.
To be added.
To be added.
Property
1.0.5000.0
2.0.0.0
System.Data.IDbCommand
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
1.0.5000.0
2.0.0.0
System.Data.IDbCommand
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
1.0.5000.0
2.0.0.0
System.Data.IDbCommand
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Property
1.0.5000.0
2.0.0.0
System.Data.IDbCommand
To be added.
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
Method
1.0.5000.0
2.0.0.0
System.Object
This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.
For a description of this member, see .
A new that is a copy of this instance.
Property
System.Data.OleDb.OleDbCommand
To be added: an object of type 'OleDbCommand'
During , if this property is not set and primary key information is present in the , the can be generated automatically if you set the property and use the . Then, any additional commands that you do not set are generated by the . This generation logic requires key column information to be present in the . For more information, see Automatically Generated Commands.
When is assigned to a previously created , the is not cloned. The maintains a reference to the previously created object.
If execution of this command returns rows, these rows may be merged with the depending on how you set the property of the object.
Gets or sets an SQL statement or stored procedure used to update records in the data source.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.DefaultValue(null)