OdbcDataAdapter::SelectCommand Property

 

Gets or sets an SQL statement or stored procedure used to select records in the data source.

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

public:
property OdbcCommand^ SelectCommand {
	OdbcCommand^ get();
	void set(OdbcCommand^ value);
}

Property Value

Type: System.Data.Odbc::OdbcCommand^

An OdbcCommand that is used during a fill operation to select records from data source for placement in the DataSet.

When SelectCommand is assigned to a previously created OdbcCommand, the OdbcCommand is not cloned. Instead, the SelectCommand maintains a reference to the previously created OdbcCommand object.

If SelectCommand returns no rows, no tables are added to the DataSet, and no exception is raised.

The following example creates an OdbcDataAdapter and sets the SelectCommand and InsertCommand properties. It assumes that you have already created an OdbcConnection object.

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

.NET Framework
Available since 1.1
Return to top
Show: