SetDbCommand

Syntax

SetDbCommandResult SetDbCommand(DbCommandId tDbCommand, SetDbCommandArg tArg)

Parameters

tDbCommand. SQL repository object moniker.

tArg. Parameters of metadata extraction.

Description

The SetDbCommand operation changes metadata of SQL object of the repository.

Comments

To execute the operation, specify the opened SQL object instance moniker in the tDbCommand field, and change parameters in the tArg field. The moniker can be obtained on executing the OpenDbCommand operation. The tArg.pattern field is used to specify the pattern, according to which the changes are made, and the updated metadata is specified in the tArg.meta field. To save changed metadata after the SetDbCommand operation, execute the SaveObject or SaveObjectAs operation.

The SetDbCommand operation is also used to set parameter values on executing parametric SQL objects. Parameter values are specified in the tArg.meta.openArgs collection, the tArg.pattern.openArgs field must also be determined. Along with input parameter values, tArg.meta.openArgs must also contain parameters with the Output/Function Result value. Values for these parameters are not set, they are calculated on executing the corresponding SQL object. To execute the SQL object within the SetDbCommand operation, determine the tArg.metaGet.rows/tArg.metaGet.exec field.

The SetDbCommand operation results in the moniker of changed SQL object and requested metadata, if the tArg.metaGet pattern was specified on executing the operation.

Example

Various methods of using this operation are given in the following examples:

Example name
Changing SQL Object Parameters
Executing Parametric SQL Object

See also:

Working with Relational and SQL Objects of Repository