Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

When developing with the Altibase Precompiler, it describes a few things to be considered in advance. In this chapter, we will refer to the development of the program by first mentioning performance, threads, and so on.

...

Also, a colon (:) must be used before the host variable in the source.

...

Checking Errors

The SQLCA object of ALTIBASE can be used without a separate declaration. It is recommended for Developers to insert code that performs error checking at all stages of using EXEC SQL statements. In the case of ALTIBASE, when using a cursor, if an error is not checked in the Cursor Prepare/Declare step, only an error indicating that the cursor has not been defined is checked at the time of opening the cursor. Please make sure to check for errors in the Cursor Prepare/Declare step that is omitted. The following error may occur during the open or fetch phase.

...

Variable

Description

sqlca.sqlcode

Error code that can determine the success/failure of SQL

SQLCODE

Eerror Error codes defined internally by ALTIBASE (ex. -69720)

SQLSTATE

Error code of char* type according to CLI standard (ex. 08S01)

...

Error

Code value

Description

SES_DUPKEY_ERR

-69720

In case of indext index duplication

SQL_ERROR

-1

If there is an error in processing

 

SQL_INVALID_HANDLE

-2

If an internal object required for SQL processing is an error

 

SQL_NO_DATA

100

If there is no data

 

SQL_SUCCESS

0

If processing is successful

 

SQL_SUCCESS_WITH_INFO

1

If processing is successful or if there is an error in the result

...