Datatype SQL

The DB_Api functions DB_ExecDirect and DB_Prepare work with SQL commands defined in your dclsql section. SQL commands you use in these DB_Api functions must be declared in a dclsql section of your script. You cannot use SQL commands in DB_Api functions that use parameters.

Example

var
 c1: cursor;

dcltrans
  transaction DBApiSelling
  begin
    ...
    DB_Prepare(c1, SelArticle);
    ...
  end DBApiSelling;

dclsql
  SelArticle:
    SELECT * FROM article
    WHERE a_stock > 5 AND a_price > 1000;