Prepares a SQL statement (declared in the SQL section) for execution. Binding of program variables and random variables used in the SQL statement is done automatically.
DBAPI.bdh
DB_Prepare( in cCursor: cursor, in sqlStat: sql ): number;
SQL return code
| Parameter | Description |
|---|---|
| cCursor | Cursor for prepared SQL statement |
| sqlStat | SQL statement name (defined in the SQL section) to be prepared for further executing |
dcltrans
transaction TPrepare
var
nRetCode: number;
begin
...
nRetCode := DB_Prepare(c1, InsSelling);
...
end TPrepare;
dclsql
InsSelling:
INSERT INTO sale VALUES (:gAno, "121297", 'N', :rTerm);DBApi01.bdf