OleDbDataAdapter Constructor (String^, OleDbConnection^)
Initializes a new instance of the OleDbDataAdapter class with a SelectCommand.
Assembly: System.Data (in System.Data.dll)
Parameters
- selectCommandText
-
Type:
System::String^
A string that is an SQL SELECT statement or stored procedure to be used by the SelectCommand property of the OleDbDataAdapter.
- selectConnection
-
Type:
System.Data.OleDb::OleDbConnection^
An OleDbConnection that represents the connection.
This implementation of the OleDbDataAdapter opens and closes an OleDbConnection if it is not already open. This can be useful in an application that must call the Fill method for two or more OleDbDataAdapter objects. If the OleDbConnection is already open, you must explicitly call Close or Dispose to close it.
When you create an instance of OleDbDataAdapter, 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.
The following example creates an OleDbDataAdapter and sets some of its properties.
Available since 1.1