Table Of Contents#
- Preface
- About This Manual
- 1. The C/C++ Precompiler
- Introduction and Concepts
- Command-Line Options
- Programming using Embedded SQL Statements
- 2. Host Variables and Indicator Variables
- Host Variables
- Classifying Host Variables
- Indicator Variables
- Classifying Indicator Variables
- Meaning of Indicator Variables
- Sample Programs
- 3. Host Variable Declaration Section
- Host Variable Declaration Section
- Data Type Definition
- Function Argument Declaration Section
- 4. C Preprocessor
- C Preprocessor Overview
- C Preprocessor Directives
- Limitations on the Use of the Preprocessor
- Preprocessor Example
- The ALTIBASE_APRE Macro
- 5. Host Variable Data Types
- Overview
- Fundamental C/C++ Data Types
- Extended APRE Data Types
- Column and Host Variable Type Conversion
- 6. Embedded SQL Statements
- Overview
- Connection related SQL statements
- Using DDL and DML in Embedded SQL Statements
- Using Other Embedded SQL Statements
- OPTION Statements
- 7. Handling Runtime Errors
- Overview
- sqlca
- SQLCODE
- SQLSTATE
- WHENEVER Statement
- Sample Programs
- 8. Using Cursor
- Overview
- Cursor-Related SQL Statements
- Reusing a Cursor Name
- Sample Programs
- 9. Using Arrays in Embedded SQL Statements
- Overview
- Using Host Array Variables in Embedded SQL Statements
- sqlca.sqlerrd
- Limitations on the Use of Array-Type Host Variables
- Structures and Arrays
- Sample Programs
- 10. Dynamic SQL Statements
- Static versus Dynamic SQL Statements
- Using Dynamic SQL Statements
- Sample Programs
- 11. Using Stored Procedures in C/C++
- Using Stored Procedures
- Using Array-Type Host Variables with the EXECUTE Statement
- Sample Programs
- 12. Applications with Multiple Database Connections
- Overview
- SQL Statements for Multi-Connections
- Using Stored Procedures in Multiple-Connection Applications
- Sample Programs
- 13. Multithreaded Applications
- Multithreaded Applications
- Sample Program
- 14. Error Codes and Messages
- Precompiler Errors
- Appendix A. Using Files and LOBs
- Output Host Variables and Files
- Input Host Variables
- Appendix B. Porting Pro*C Applications to APRE
- Datatypes
- Embedded Functions
- Managing Database Connections
- Host Variables
- Using Embedded SQL Statements
- Execution Results and Status Codes
- Commit Mode
- Sample Programs
- Appendix C. The Method 4 of Dynamic SQL
- SQLDA structure Data type
- Appendix D. Sample Applications
- Executing the Sample Applications
- Table Information of the Example Programs
- Appendix E. FAQ
- Precompiler FAQ