SQL/MP Programming Manual for C

Hewlett-Packard Company429847-008
i
HP NonStop SQL/MP
Programming Manual for C
Index Examples Figures Tables
Legal Notices
What’s New in This Manual xi
Manual Information xi
New and Changed Information xi
About This Manual xv
Who Should Read This Guide xv
Related Manuals xv
Notation Conventions xx
HP Encourages Your Comments xxii
1. Introduction
Advantages of Using Embedded SQL Statements 1-1
Developing a C Program 1-1
Declaring and Using Host Variables 1-2
Embedding SQL/MP Statements and Directives 1-3
Calling SQL/MP System Procedures 1-4
Compiling and Executing a Host-Language Program 1-5
Processing Errors, Warnings, and Status Information
1-5
Dynamic SQL
1-6
SQL/MP Version Management
1-7
2. Host Variables
Specifying a Declare Section 2-1
Coding Host Variable Names
2-2
Using Corresponding SQL and C Data Types
2-3
Specifying Host Variables in SQL Statements 2-6
Declaring and Using Host Variables
2-7
Fixed-Length Character Data
2-7
Variable-Length Character Data
2-9
Structures
2-9
Decimal Data Types 2-11