SQL/MP Programming Manual for C
Contents
HP NonStop SQL/MP Programming Manual for C—429847-008
vii
C. Maximizing Local Autonomy
C. Maximizing Local Autonomy
Using a Local Partition C-1
Using TACL DEFINEs C-2
Using Current Statistics C-2
Skipping Unavailable Partitions C-3
D. Converting C Programs
Generating SQL Data Structures D-1
Generating SQLDA Structures D-2
Generating a Version 300 (or Later) SQLDA Structure D-3
Generating a Version 2 SQLDA Structure D-3
Generating a Version 1 SQLDA Structure D-6
Planning for Future PVUs D-8
SQL/MP Version Procedures D-8
RELEASE1 and RELEASE2 Options D-8
Index
Examples
Example 1-1. Static SQL Statements in a C Program 1-4
Example 1-2. Dynamic SQL Statements in a C Program 1-6
Example 2-1. Creating Valid DATETIME and INTERVAL Data Types 2-16
Example 2-2. CREATE TABLE Statements 2-20
Example 2-3. Structures Generated by the INVOKE Directive 2-21
Example 4-1. Using a Static SQL Cursor in a C Program 4-14
Example 5-1. Example of the SQLCAGETINFOLIST Procedure 5-13
Example 5-2.
Example of the SQLSADISPLAY Display 5-22
Example 6-1. Sample SQL Compiler Listing 6-25
Example 9-1. Checking the sqlcode Variable 9-5
Example 9-2.
Enabling and Disabling the WHENEVER Directive 9-9
Example 9-3.
Using the WHENEVER Directive 9-10
Example 9-4. Version 300-325 SQLSA Structure 9-15
Example 9-5.
Version 330 (or later) SQLSA Structure 9-16
Example 10-1.
SQLDA Structure and Buffers 10-7
Example 10-2.
Getting Parameter Values 10-15
Example 10-3.
Using Statement and Cursor Host Variables 10-22
Example 10-4. Allocating the SQLDA Structure 10-30
Example 10-5.
Allocating Memory for Parameters and Columns 10-32
Example 10-6.
Displaying Output 10-34
Example 10-7. Basic Dynamic SQL Program 10-39