Skip to content

About This Manual#

This manual explains how to use the embedded SQL statement of Altibase and C/C++ precompiler. The user can create an application using the embedded SQL statement of Altibase and precompile the created program

Audience#

This manual has been prepared for the following Altibase users:

  • Database administrators
  • Performance administrators
  • Database users
  • Application developers
  • Technical Supporters

It is recommended for those reading this manual possess the following background knowledge:

  • Basic knowledge in the use of computers, operating systems, and operating system utilities
  • Experience in using relational database and an understanding of database concepts
  • Computer programming experience
  • Experience in database server management, operating system management, or network administration

Organization#

This manual is organized as follows:

  • Chapter 1: The C/C++ Precompiler
    This chapter presents an introduction to the C/C++ precompiler and how to use it, and gives a detailed description of the procedure for writing applications that contain embedded SQL statements.

  • Chapter 2: Host Variables and Indicator Variables
    This chapter describes both host variables and indicator variables, and explains how to interpret the meaning of indicator variables

  • Chapter 3: Host Variable Declaration Section
    This chapter explains both the host variable declaration section and the function argument declaration section

  • Chapter 4: C Preprocessor

  • Chapter 5: Host Variable Data Types
    This chapter describes the data types that are used for host variables.

  • Chapter 6: Embedded SQL Statements
    This chapter explains how to use embedded SQL statements, including those for managing database connections and executing DDL and DML statements.

  • Chapter 7: Handling Runtime Errors
    This chapter explains how to use the standard variables for handling runtime errors.

  • Chapter 8: Using Cursors
    This chapter explains the statements used to manage cursors.

  • Chapter 9: Using Arrays in Embedded SQL Statements
    This chapter covers how to use array-type host variables and discusses arrays of structures and the limitations on their use.

  • Chapter 10: Dynamic SQL Statements
    This chapter explains dynamic SQL statements.

  • Chapter 11: Using Stored Procedures in C/C++
    This chapter describes how to use stored functions and stored procedures.

  • Chapter 12: Application with Multiple Database Connections
    This chapter covers how to write applications that use multiple database connections.

  • Chapter 13: Multithreaded Applications
    This chapter discusses how to write multithreaded applications.

  • Chapter 14: Error Codes and Messages
    This chapter explains the APRE error codes and messages.

  • Appendix A. Using Files and LOBs
    This chapter describes how to use the file system to input or output BLOB and CLOB data.

  • Appendix B. Porting ProC Applications to APRE
    This chapter discusses how to convert applications written with Oracle ProC(C++) to APRE.

  • Appendix C. The Method 4 of Dynamic SQL
    This appendix should be thoroughly comprehended and referred especially when utilizing the method 4 of dynamic SQL since it can insert a value for parameter marker at a time of executing a program.

  • Appendix D. Sample Applications
    This chapter explains the location of the sample applications.

  • Appendix E. FAQ
    This chapter lists frequently asked questions about how to use APRE and embedded SQL statements.

Documentation Conventions#

This section describes the conventions used in this manual. Understanding these conventions will make it easier to find information in this manual and in the other manuals in the series.

There are two sets of conventions:

  • Syntax diagram conventions
  • Sample code conventions

Syntax Diagram Conventions#

This manual describes command syntax using diagrams composed of the following elements:

Elements Meaning
Indicates the start of a command.
If a syntactic element starts with an arrow, it is not a complete command.
Indicates that the command continues to the next line.
If a syntactic element ends with this symbol, it is not a complete command.
Indicates that the command continues from the previous line.
If a syntactic element starts with this symbol, it is not a complete command.
Indicates the end of a statement.
Indicates a mandatory element.
Indicates an optional element.
Indicates a mandatory element comprised of options.
One, and only one, option must be specified.
Indicates an optional element comprised of options
Indicates an optional element in which multiple elements may be specified.
A comma must precede all but the first element.

Sample Code Conventions#

The code examples explain SQL statements, stored procedures, iSQL statements, and other command line syntax.

The following table describes the printing conventions used in the code examples.

Rules Meaning <Example>
[ ] Indicates an optional item VARCHAR [(size)] [[FIXED |] VARIABLE]
{ } Indicates a mandatory field for which one or more items must be selected. { ENABLE | DISABLE | COMPILE }
| A delimiter between optional or mandatory arguments. { ENABLE | DISABLE | COMPILE }
[ ENABLE | DISABLE | COMPILE ]
. . . Indicates that the previous argument is repeated, or that sample code has been omitted. iSQL> SELECT e_lastname FROM employees;
E_LASTNAME
------------------------
Moon
Davenport
Kobain
. . .
20 rows selected.
Other Symbols Symbols other than those shown above are part of the actual code. EXEC :p1 := 1;
acc NUMBER(11,2)
Italics Statement elements in italics indicate variables and special values specified by the user. SELECT * FROM table_name;
CONNECT userID/password;
Lower case words Indicate program elements set by the user, such as table names, column names, file names, etc. SELECT ename FROM employee;
Upper case words Keywords and all elements provided by the system appear in upper case. DESC SYSTEM.SYS_INDICES;

For more detailed information, please refer to the following documents.

  • Installation Guide

  • Administrator's Manual

  • CLI User's Manual

  • SQL Reference

  • Stored Procedures Manual

  • iSQL User's Manual

  • Error Message Reference

Altibase Welcomes Your Comments and Feedbacks#

We welcome your feedback on this manual. Your input is valuable in helping us improve future versions of the manual.

If you find any errors, omissions, or other technical issues in the Altibase manual, please report them through the Technical Support Portal, and we will address them with care. For immediate assistance with technical matters, you may also request support through the Technical Support Portal.

Thank you for your continued interest and valuable feedback.