Gets or sets how the CommandText property is to be interpreted.
[Visual Basic] Overridable Public Property CommandType As CommandType [C#] public CommandType CommandType {override get; override set;} [C++] public: __property virtual CommandType get_CommandType(); public: __property virtual void set_CommandType(CommandType); [JScript] public function get CommandType() : CommandType; public function set CommandType(CommandType);
One of the CommandType values. The default is Text.
Exception Type | Condition |
---|---|
TableDirectNotSupported | The CommandType value of TableDirect is not supported by SQLCommand. |
After the new value is set, a OnSchemaChanged event is raised.
The following example creates a SQLCommand and sets some of its properties.
SQLCommand Class | SQLCommand Members | System.Data.SQL Namespace | CommandText | CommandTimeout | ActiveConnection | CommandBehavior