System.Data.OleDb Namespace OleDbDataAdapter Class
Initializes a new instance of the OleDbDataAdapter class.
[ VB ]
Overloads Public Sub New ( )
[ C# ]
public OleDbDataAdapter ( );
[ C++ ]
public: OleDbDataAdapter ( );
[ JScript ]
public function OleDbDataAdapter ( );
When an instance of OleDbDataAdapter is created, the following read/write properties are set to initial values.
You can change the value of any of these properties through a separate call to the property.
The following example initializes an OleDbDataAdapter using this constructor, then sets some of its properties.
// set up the connection
OleDbConnection myConn = new OleDbConnection (
"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" +
Server.MapPath ( "~/app_data/dbtutor.mdb" ) );
// set up the dataadapter
OleDbDataAdapter myAdapter = new OleDbDataAdapter ( );
myAdapter.SelectCommand.CommandText = "SELECT * FROM Products";
myAdapter.SelectCommand.Connection = myConn;
' set up the connection
dim myConn as new OleDbConnection (
"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" +
Server.MapPath ( "~/app_data/dbtutor.mdb" ) );
' set up the dataadapter
dim myAdapter as new OleDbDataAdapter ( )
myAdapter.SelectCommand.CommandText = "SELECT * FROM Products"
myAdapter.SelectCommand.Connection = myConn |
|
C# |
VB |
OleDbDataAdapter Members OleDbDataAdapter Constructor Overload List MissingMappingAction MissingSchemaAction