RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAdoDbxCommand.CommandText Property

Gets or sets the SQL statement, table name, or stored procedure to execute at the data source.

Pascal
property CommandText: String;
C++
__property AnsiString CommandText;

When you set the CommandType property to StoredProcedure, you set the CommandText property to the name of the stored procedure. You might need to use escape character syntax if your stored procedure name contains special characters, such as underscores. The command executes this stored procedure when you call either the ExecuteReader, ExecuteScalar, or ExecuteNonQuery methods. When you set the CommandType property to TableDirect, you set the CommandText property to the name of the table you want to access. You might need to use escape character syntax if any of the tables contain special characters. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!