11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EDADRV_PrepareStmt<br />

Syntax<br />

RETCODE EDADRV_PrepareStmt(connhdl,stmthdl,stmt)<br />

Description<br />

The EDADRV_PrepareStmt function prepares a statement passed to it by EDA. If the<br />

driver already has a statement handle that it can reuse, it may choose to return this<br />

preallocated handle in the stmthdl output variable, otherwise, it allocates a new<br />

statement handle and returns it in stmthdl.<br />

If the statement is a DDL statement (statement type EDASTMT_DDL) or a DML<br />

statement, such as INSERT, UPDATE or DELETE (statement type<br />

EDASTMT_DML), or a SELECT statement (statement type EDASTMT_QUERY),<br />

the statement may contain input parameters. These parameters are designated by<br />

parameter markers (“?”). In this case, EDA supplies as many parameter descriptions<br />

as there are parameter markers.<br />

If the statement is a stored procedure call (statement type<br />

EDASTMT_PROCEDURE), the statement may contain input, output, and<br />

input/output parameters (parameter types of EDAPARAM_IN, EDAPARAM_OUT,<br />

and EDAPARAM_INOUT). In this case, EDA supplies as many parameter descriptions<br />

as there are input and input/output parameters of a stored procedure.<br />

The EDADRV_PrepareStmt function allocates an array of EDA_T_PTYPE structures,<br />

converts EDA data type into the corresponding external database data type, and<br />

associates this array with the statement handle for its later use in<br />

EDADRV_ExecuteStmt.<br />

EDADRV_PrepareStmt 1-247

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!