DbiQExecDirect

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiQExecDirect

Return to chapter overview

C syntax

DBIResult DBIFN DbiQExecDirect (hDb, eQryLang, pszQuery, phCur);

Delphi syntax

function DbiQExecDirect (hDb: hDBIDb; eQryLang: DBIQryLang; pszQuery: PChar; phCur: phDBICur): DBIResult stdcall;

Description

DbiQExecDirect executes a SQL or QBE query and returns a cursor to the result set, if one is generated.

Parameters

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

eQryLang                Type: DBIQryLang                (Input)
Specifies the query language, QBE or SQL.

pszQuery                Type: pCHAR                (Input)
Pointer to the query, formulated in the appropriate language.

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

Usage

This function is used to immediately prepare and execute a query. If the query returns a result set, the cursor handle to the result set is returned into the address given by phCur. If the query does not generate a result set, the returned cursor handle is zero. If no cursor handle address is given and a result set would be returned, the result set is discarded.

SQL: For SQL language queries, if the database handle given does not refer to a server database, the BDE SQL dialect is recognized. Otherwise, the appropriate server dialect is expected. Heterogeneous data access and cross-server data access can be achieved by using the BDE SQL dialect and referencing tables qualified with database alias names.

QBE: For QBE language queries, the BDE QBE Syntax is expected. Heterogeneous data access and cross-server data access can be achieved.

DbiResult

Meaning

DBIERR_NONE

The query was successfully prepared and executed.

DBIERR_MULTIRESULTS

Query returned multiple result sets.

See also

DbiQAlloc, DbiQExec, DbiQFree, DbiQPrepare, DbiQSetParams