Initializes a new instance of the SQLCommand class without any parameters.
[Visual Basic] Overloads Public Sub New() [C#] public SQLCommand(); [C++] public: SQLCommand(); [JScript] public function SQLCommand();
When an instance of SQLCommand is created, the following read/write properties are set to initial values.
Properties | Initial Value |
---|---|
CommandText | empty string ("") |
CommandTimeout | 30 |
CommandType | System.Data.SQL.SQLCommand.CommandType.Text |
ActiveConnection | null |
CommandBehavior | 0 |
You can change the value for any of these properties through a separate call to the property.
The following example creates a SQLCommand and sets some of its properties.
SQLCommand Class | SQLCommand Members | System.Data.SQL Namespace | SQLCommand Constructor Overload List