Gets or sets the SQL text command to run against the data source.
[Visual Basic] Overridable Public Property CommandText As String [C#] public string CommandText {override get; override set;} [C++] public: __property virtual String* get_CommandText(); public: __property virtual void set_CommandText(String*); [JScript] public function get CommandText() : String; public function set CommandText(String);
The SQL text command to execute.
If the assigned string is not the current string, CommandText is set to the new value. Then, 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 | ActiveConnection | CommandTimeout | CommandType | CommandBehavior