OleDbDataAdapter Constructor (String^, String^)

 

Initializes a new instance of the OleDbDataAdapter class with a SelectCommand.

Namespace:   System.Data.OleDb
Assembly:  System.Data (in System.Data.dll)

public:
OleDbDataAdapter(
	String^ selectCommandText,
	String^ selectConnectionString
)

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.

selectConnectionString
Type: System::String^

The connection string.

This overload of the OleDbDataAdapter constructor uses the selectConnectionString parameter to set the SelectCommand property. However, it does not open the connection. You still must explicitly open the connection.

When you create an instance of OleDbDataAdapter, the following read/write properties are set to the following 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.

The following example creates an OleDbDataAdapter and sets some of its properties.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: