GetDbCommandResult GetDbCommand(DbCommandId tDbCommand, GetDbCommandArg tArg)
tDbCommand. SQL repository object moniker.
tArg. Parameters for getting metadata.
The GetDbCommand operation gets metadata of SQL object of the repository.
This operation enables the user to get the following information:
Repository database, to which an SQL object is set to work.
Text of executed SQL query.
Information about parameters that are used to pass data to query.
SQL object execution results.
To execute the operation, determine SQL object instance moniker in the tDbCommand field and parameters, according to which information is obtained, in the tArg field. The moniker can be obtained on executing the OpenDbCommand operation. Use the tArg.pattern field to specify the pattern that will be used to get information. Depending on the type of the SQL object that is used in work, it is required to determine the following pattern fields to execute the object and get results:
For Query: the rows field and, if it is required to limit obtained data set, the rowsFilter field.
For DBMS command and Procedure: the exec field.
If an object is parametric, first set parameter values by means of the SetDbCommand operation. The object can be calculated by specifying the rows/exec fields in the tArg.metaGet field of the SetDbCommand operation.
Operation execution results in the requested metadata and execution results.
Various methods of using this operation are given in the following examples:
Example name |
Getting Information about SQL Object Structure |
Getting Query Execution Result |
See also: