SQLPREP Verb - Set Up SQL Command
Syntax
SQLPREP(sqlchan{,ERR=lineref})str
For BBj-specific information, see the SQLPREP Verb - BBj.
Description
The SQLPREP verb sets up the command in str to be executed in SQL. It must be of valid SQL syntax and name a table associated with the database opened to sqlchan. SQLPREP is normally followed by either SQLSET to set optional arguments, or SQLEXEC to set and begin execution of the command in the SQLPREP str.
Examples
0100 SQLOPEN(1)"General Ledger"
0110 SQLPREP(1)"Create table april96 (order_num char(4)
0110:primary key, order_amt integer(10,2))"
0120 SQLEXEC(1)
0130 SQLPREP(1)"Insert into april96 values (?,?)"
0140 LOOP:
0150 INPUT "Order Num>",ON$
0160 INPUT "Amount>",AMT
0170 SQLEXEC(1)ON$, AMT
0180 GOTO LOOP