Gets or sets the text command to run against the data source.
[Visual Basic] Overridable Public Property CommandText As String [C#] public string CommandText {virtual get; virtual 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 text command to execute. The default value is the empty string ("").
If the string being assigned is not the current string, a OnSchemaChanging event will be raised and the new value set. After, a OnSchemaChanged event will be raised.
The following example creates an DBCommand and sets some of its properties.
DBCommand Class | DBCommand Members | System.Data.Internal Namespace | CommandType | UpdatedRowSource