SQL/MX Programming Manual for C and COBOL (H06.10+, J06.03+)
Contents
HP NonStop SQL/MX Programming Manual for C and COBOL—544617-003
viii
11. Dynamic SQL Cursors (continued)
11. Dynamic SQL Cursors (continued)
Initialize the Dynamic Input Parameters 11-5
Open the Cursor 11-5
Retrieve the Values 11-5
Process the Retrieved Values 11-6
Fetch the Next Row 11-6
Close the Cursor and Deallocate the Prepared Statement 11-6
Using Date-Time and INTERVAL Data Types 11-7
Standard Date-Time Example 11-7
Interval Example 11-8
Nonstandard SQL/MP DATETIME Example 11-9
Dynamic SQL Cursors Using Descriptor Areas 11-10
12. Dynamic SQL Rowsets
Using Dynamic SQL Rowsets 12-1
Preparing an SQL Statement With Dynamic Rowsets 12-2
Specification of an Rowset Parameter in the PREPARE String 12-3
Matching Compile-Time Specified Length With Execution-Time Length 12-4
Dynamic SQL With Argument Lists 12-5
Using the SET DESCRIPTOR Statement 12-5
Setting the Rowset-Specific Descriptor Fields 12-5
Exclusive Use of VARIABLE_POINTER and INDICATOR_POINTER 12-9
Using the GET DESCRIPTOR Statement 12-9
Using the DESCRIBE INPUT Statement 12-10
13. Exception Handling and Error Conditions
Checking the SQLSTATE Variable 13-1
Declaring SQLSTATE 13-1
SQL:1999 SQLSTATE Values 13-2
SQL/MX SQLSTATE Values 13-3
Using SQLSTATE 13-4
Checking the SQLCODE Variable 13-5
Declaring SQLCODE 13-5
Declaring SQLCODE and SQLSTATE 13-5
SQLCODE Values 13-6
Using SQLCODE 13-6
SQL/MX Exception Condition Messages 13-7
Viewing the SQL Messages 13-7
Accessing SQL Messages Within a Program 13-8










