EPUB | CHM | PDF

TPSQLStoredProc.Properties.ParamBindMode

Top Previous Next

Determines the order in which a component's parameters are assigned to the parameter list for the stored procedure on the server.

Syntax:

type TParamBindMode = (pbByName, pbByNumber);
property ParamBindMode: TParamBindMode;

Description:

Examine or set ParamBindMode to determine the order in which parameters in the Params property are matched to the parameters used by the stored procedure on the server. ParamBindMode can be one of the following:

Parameters:

pbByName

Parameters specified in the Params property are matched to identically named parameters on the server. This is the default.

pbByNumber

Parameters in Params are assigned one-by-one to the next available parameter on the server (for example, the first parameter in Params is assigned to the first parameter used by the stored procedure, and so on).

Whenever possible, ParamBindMode should be pbByName. This guarantees that parameters are matched to the correct parameters used by the stored procedure regardless of physical ordering in Params. At design time, the names of known parameters appear in the Parameters editor.

Many "internal" stored procedures in PostgreSQL server have no names for their parameters. If you call Prepare, unnamed parameters will be named as "argX" in Params property, where X is the ordinal number of parameter in function declaration.

See also: ExecProc, ParamCount, Params