DbiQExecProcDirect

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiQExecProcDirect

Return to chapter overview

C syntax

DBIResult DBIFN DbiQExecProcDirect (hDb, pszProc, uParamDescs, paParamDescs, pRecBuf, phCur);

Delphi syntax

function DbiQExecProcDirect (hDb: hDBIDb; pszProc: PChar; uParamDescs: Word; paParamDescs: pSPParamDesc; pRecBuff: Pointer; var hCur: hDBICur): DBIResult stdcall;

Description

DbiQExecProcDirect executes a stored procedure and returns a cursor to the result set, if one is generated.

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 DbiQExecProcDirect, all input parameters must be specified before output parameters.

Parameters

hDb                Type: hDBIDb                (Input)
Specifies the database handle.

pszProc                Type: pCHAR                (Input)
Stored procedure name.

uParamDescs                Type: UINT16                (Input)
Number of parameter descriptors.

paParamDescs                Type: pSPParamDesc                (Input)
Array of parameter descriptors.

pRecBuf                Type: pBYTE                (Input)
Record buffer.

phCur                Type: phDBICur                (Output)
Pointer to the cursor handle.

DbiResult

Meaning

DBIERR_NONE

The stored procedure was successfully prepared and executed.

DBIERR_MULTIRESULTS

Query returned multiple result sets.

See also

DbiQAlloc, DbiQPrepareProc, DbiQSetProcParams, DbiOpenSPList, DbiOpenSPParamList