Progress
Embedded SQL-92
Guide and Reference


EXECUTE Statement

Executes the statement specified in statement_name.

SYNTAX

EXEC SQL EXECUTE statement_name
  [ USING { [ SQL ] DESCRIPTOR structure_name 
    | :host_variable [ [ INDICATOR ] :ind_variable ] , ... }
  ] ; 

statement_name

The name of the prepared SQL-92 statement.

structure_name

The name of an SQL-92 descriptor area (SQLDA).

EXAMPLE

This example is a code fragment from the DynUpd function in sample program 3DynUpd.pc. This example illustrates the dynamic processing of an UPDATE statement The complete source for the sample program is listed in "ESQL-92 Sample Programs."

/*
** Process the non-SELECT input statement
**    PREPARE the statement
**    EXECUTE the prepared statement
**    COMMIT WORK
*/

      EXEC SQL PREPARE dynstmt FROM :sql_stmt_v ;
      EXEC SQL EXECUTE dynstmt ;
      EXEC SQL COMMIT WORK ; 

NOTES

AUTHORIZATION

The user executing this statement must have authorization for the SQL statement being executed. See AUTHORIZATION for the relevant statement.

SQL COMPLIANCE

SQL-92

ENVIRONMENT

Embedded SQL-92 only

RELATED STATEMENTS

EXECUTE Statement, PREPARE Statement, SQLCA structure


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095