Dynamic SQL
\The Sandbox \PB History & Future \New in PB 2 \PowerScript \Dynamic SQL
Data Types
Dynamic SQL
Dynamic SQL
Functions
Embedded SQL
Blob Support
New & Modified
Functions
International
Support
Microsecond
Support
Revised HALT
Statement
Reserved Words

Database applications usually perform a specific activity and you know the complete SQL statement when you write and compile the script.  When PowerBuilder does not support the statement in embedded SQL (for example, a DDL statement) or the parameters are unknown at compile time, the application must build the SQL statements at runtime.  The parameters used in the dynamic SQL statements can change each time the program is executed. 

You use dynamic SQL if the following situations exist at compile time:

  1. Non-result set statements with no input parameters
  2. Non-result set statements with input parameters
  3. Result set statements in which the input parameters and result set columns are known at compile time
  4. Result set statements in which the input parameters, the result set columns or both are unknown at compile time

To handle the situations described above, use:

    The PowerBuilder dynamic SQL statements

    The dynamic versions of CLOSE, DECLARE, FETCH, and OPEN

    The PowerBuilder types DynamicStagingArea and DynamicDescriptionArea

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com