DSQL Requirements (Embedded SQL Guide)

From InterBase

Go Up to Application Requirements

DSQL applications must adhere to all the requirements for all SQL applications and meet additional requirements as well. DSQL applications enable users to enter ad hoc SQL statements for processing at run time. To handle the wide variety of statements a user might enter, DSQL applications require the following additional programming steps:

  • Declare as many extended SQL descriptor areas (XSQLDAs) as are needed in the application; typically a program must use one or two of these structures. Complex applications may require more.
  • Declare all transaction names and database handles used in the program at compile time; names and handles are not dynamic, so enough must be declared to accommodate the anticipated needs of users at run time.
  • Provide a mechanism to get SQL statements from a user.
  • Prepare each SQL statement received from a user for processing.
    PREPARE loads statement information into the XSQLDA.
  • EXECUTE each prepared statement.

EXECUTE IMMEDIATE combines PREPARE and EXECUTE in a single statement. For more information, see the Language Reference Guide.

In addition, the syntax for cursors involving Blob data differs from that of cursors for other data types. For more information about Blob cursor statements, see Language Reference Guide.


Advance To: