RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DataStoreCommand.CommandText Property

Gets or sets Blackfish SQL SQL statement or stored procedure name.

Pascal
property CommandText: string;
C++
__property string CommandText;

CommandText holds the Blackfish SQL SQL statement or stored procedure name to execute.  

When the CommandType property is set to CommandType.Text, this property should be set to a SQL statement. Parameters can be marked with either a question mark (?) or named parameter markers. For example:

SELECT * FROM EMPLOYEE WHERE EMP_NO=?
SELECT * FROM EMPLOYEE WHERE EMP_NO=EMP

When question marks (?) are used, the order of the parameters in Parameters must match the order in which they appear in the SQL statement. When named parameters are used the names must match, but the order doesn't matter.  

When the CommandType property is set to CommandType.StoredProcedure, this property should be set to a stored procedure name. The parameters are implicit. For example:

DB_UTIL.SIN
MYSCHEMA.MYPROCEDURE

The parameters are given by the name of the parameters of the stored procedure. You can find the names of the stored procedure from ISQL or from the built-in stored procedure DB_ADMIN.GET_PROCEDURE_COLUMNS. 

 

CommandText (MSDN) 

DB_ADMIN 

GET_PROCEDURE_COLUMNS

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