Progress
SQL-92
Guide and Reference


EXECUTE Statement

Executes the statement specified in statement_name. This is the syntax for an EXECUTE statement:

SYNTAX

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

statement_name

Name of the prepared SQL-92 statement.

structure_name

Name of an SQL-92 descriptor area (SQLDA).

EXAMPLE

This example is a code fragment from the DynUpd function in sample program 3DynUpd.pc, which illustrates dynamic processing of an UPDATE statement. The complete source for sample program, 2StatSel.pc, is listed in Appendix A of the Progress Embedded SQL-92 Guide and Reference .

/* 
** 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

(See AUTHORIZATION for the relevant statement)

SQL COMPLIANCE

SQL-92

ENVIRONMENT

Embedded SQL-92 only

RELATED STATEMENTS

EXECUTE IMMEDIATE Statement, PREPARE Statement, SQLCA structure


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