RAD Studio |  |

Specifying the Command to Execute
See Also
Collapse All

With unidirectional datasets, the way you specify the command to execute is the same whether the command results in a dataset or not. That is:

When using TSQLDataSet, use the CommandType and CommandText properties to specify the command:

- If CommandType is ctQuery, CommandText is the SQL statement to pass to the server.
- If CommandType is ctStoredProc, CommandText is the name of a stored procedure to execute.

When using TSQLQuery, use the SQL property to specify the SQL statement to pass to the server.

When using TSQLStoredProc, use the StoredProcName property to specify the name of the stored procedure to execute.

Just as you specify the command in the same way as when you are retrieving records, you work with query parameters or stored procedure parameters the same way as with queries and stored procedures that return records.

See Also

Executing the Command

Creating and Modifying Server Metadata

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!