DbiQSetProcParams

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiQSetProcParams

Return to chapter overview

C syntax

DBIResult DBIFN DbiQSetProcParams (hStmt, uParamDescs, paParamDescs, pRecBuf );

Delphi syntax

function DbiQSetProcParams (hStmt: hDBIStmt; uParamDescs: Word; paParamDescs: pSPParamDesc; pRecBuff: Pointer): DBIResult stdcall;

Description

DbiQSetProcParams binds parameters for a stored procedure prepared with DbiQPrepareProc.

Parameters

hStmt                Type: hDBIStmt                (Input)
Specifies the statement handle.

uParamDescs                Type: UINT16                (Input)
Specifies the number of parameter descriptors.

paParamDescs                Type: pSPParamDesc                (Input)
Pointer to the array of parameter descriptors.

pRecBuf                Type: pBYTE                (Input)
Pointer to the record buffer. (Or NULL if parameters are not to be bound.)

Usage

You must set all parameters (including output parameters) before statement execution. After execution, output parameter values are placed in the specified offset of the client-supplied pRecBuf. If the output parameter value is NULL or TRUNCATED, then indNULL or indTRUNC is placed in the iNulloffset of the client-supplied pRecBuf. Note that indNULL and indTRUNC are enums defined by eINDValues.

Sybase: Output parameter values are not available until after all rows have been fetched from the result set.

InterBase: When calling DbiQSetProcParams and DbiQPrepareProc, all input parameters must be specified before output parameters.

Prerequisites

The function DbiQPrepareProc must be called before calling DbiQSetProcParams.

These function calls assume that the client knows the stored procedure parameters, parameter types (such as INPUT, OUTPUT, INPUT/OUTPUT), and parameter datatypes.

DbiResult

Meaning

DBIERR_NONE

The value of parameter markers was successfully set.

DBIERR_OBJNOTFOUND

A field descriptor references a parameter marker that does not exist.

See also

DbiQPrepareProc, DbiQExecProcDirect, DbiOpenSPList, DbiOpenSPParamList