Among the contents of each part described above, the parts to be considered when converting from other DBMSs are summarized in a table.
| Example of using ALTIBASE and Explanation |
---|---|
CONNECT/DISCONNECT | EXEC SQL CONNECT [AT :con_name] CONNECT :usr IDENTIFIED BY :pwd USING :opt;
|
Function argument | void user_function (char *param1) { EXEC SQL BEGIN ARGUMENT SECTION; char *param1; EXEC SQL END ARGUMENT SECTION; } or, void user_function (char *param1) { EXEC SQL BEGIN DECLARE SECTION; char *H_param1; EXEC SQL END DECLARE SECTION;
H_param1 = param1; } |
Error code | sqlca.sqlcode, SQLCODE, SQLSTATE, etc. can be used without a separate declaration, and the error code is different from other DBMSs, so the user must appropriately convert it. If the CLI standard code is used, it can be used interchangeably. Statements such as EXEC SQL INCLUDE sqlca.h; are not needed.
|
Host variable declaration | Starting from ALTIBASE Version 5.3 or later, the host variable declaration clause can be omitted according to the apre option. Alternatively, the variable indicated in the declaration clause can be used as a host variable as before. EXEC SQL BEGIN DECLARE SECTION; char *H_param1; EXEC SQL END DECLARE SECTION;
Starting from ALTIBASE Version 5.3.3 or later, the initialization of host variables is supported.
|
Header file path | When specifying a header in the source, it can be done as follows. EXEC SQL INCLUDE "…../user_header.h"; Or, EXEC SQL OPTION (INCLUDE=/Absoulte path/); EXEC SQL INCLUDE user_header.h; |
Declaration of host variable in header file | #ifdef SESC_DECLARE ….. #endif It can be specified in the define clause as above. |
Omit the into clause of SELECT | Not supported |
SET TRANSACTION ~ statement | Not supported |