System.Data.OleDb Namespace OleDbCommand Class
Initializes a new instance of the OleDbCommand class with the text of the query.
[ VB ]
Overloads Public Sub New ( _
ByVal cmdText As String _
)
[ C# ]
public OleDbCommand (
string cmdText
);
[ C++ ]
public: OleDbCommand (
String* cmdText
);
[ JScript ]
public function OleDbCommand (
cmdText : String
);
- cmdText
- The text of the query.
The following table shows initial property values for an OleDbCommand instantiated with this constructor.
You can change the value for any of these parameters by setting the related property.
The following example initializes an OleDbCommand with a given query.
string query = "SELECT * FROM Categories ORDER BY CategoryID";
OleDbCommand myCommand = new OleDbCommand ( query );
myCommand.CommandTimeout = 20;
Dim query As String = "SELECT * FROM Categories ORDER BY CategoryID"
Dim myCommand As new OleDbCommand ( query )
myCommand.CommandTimeout = 20 |
|
C# |
VB |
OleDbCommand Members OleDbCommand Constructor Overload List