asp.net.ph

OleDbDataAdapter Constructor ( )

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 ( );

Remarks

When an instance of OleDbDataAdapter is created, the following read/write properties are set to initial values.


Properties Initial Value
MissingMappingAction MissingMappingAction.Passthrough
MissingSchemaAction MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Example

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;
  C# VB

See Also

OleDbDataAdapter Members   OleDbDataAdapter Constructor Overload List   MissingMappingAction   MissingSchemaAction Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph