|
<< Click to Display Table of Contents >> DbiQPrepare |
![]() ![]()
|
C syntax
DBIResult DBIFN DbiQPrepare (hStmt, pszQuery);
Delphi syntax
function DbiQPrepare (hStmt: hDBIStmt; pszQuery: PChar): DBIResult stdcall;
Description
DbiQPrepare prepares a SQL or QBE query for execution, and accepts a handle to a statement containing the prepared query.
Parameters
hStmt Type: hDBIStmt (Input)
Specifies the statement handle
pszQuery Type: pCHAR (Input)
Pointer to the query, formulated in the appropriate language.
Usage
This function is used to prepare a query for subsequent execution.
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 for execution. |
DBIERR_ALIASNOTOPEN |
One of the aliases used in the query was not opened prior to preparing the query. The alias name can be found on the error context stack. |
See also
DbiQAlloc, DbiQExec, DbiQExecDirect, DbiQFree, DbiQSetParams