Overview
ALTIBASE HDB provides APRE*C to develop an application for C/C++.
It is similar tool-kit to PRO*C in ORACLE.
At first, We recommend you to read a manual about APRE for C/C++.
|
In the above figure,
- User writes a source code having a extension like ".sc" using embedded-SQL in C/C++ style.
(User has to write source-file of extension like "*.sc") - User executes APRE provided by Altibase for changing a source to C/C++ style.
(Apre changes "xxxx.sc" to "xxxx.c" or "xxxx.cpp" like C/C++ style) - User compiles and links an object with altibase-libraries and system-libraries. altibase libraries are libapre.a and libodbccli.a
- After all steps are done, you can make an application-binary to serve for your customer.
Precompiler options
ALTIBASE HDB |
ORACLE |
Comments |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-h |
No Option (oracle displays help content when executed without options) |
display help content about options. |
|||||||||||||||
-t Unknown macro: {c|cpp}
|
like CODE= Unknown macro: {ANSI_C|KR_C|CPP}
option |
This is used to choose the filename extension of the file created |
|||||||||||||||
-o output_path |
|
This is used to specify the location of the file(s) created by APRE. |
|||||||||||||||
-mt |
THREADS= Unknown macro: {yes|no}
|
This option is used to prevent an error from being raised |
|||||||||||||||
-spill |
No option |
This option is specified only when precompiling in an AIX environment. |
|||||||||||||||
-keyword |
No option |
display reserved keywords. |
|||||||||||||||
-nchar_var |
|
When this option is used, APRE processes the specified |
|||||||||||||||
-nchar_utf16 |
UTF16_CHARSET |
When this option is used, national character type data are |
- ALTIBASE HDB doesn't provide features like other oracle's options except above options.
To make a binary
Option |
ALTIBASE HDB |
ORACLE |
---|---|---|
precomiling |
apre -mt -t Unknown macro: {cpp|c}
sample.sc |
proc iname=sample.pc |
Definition about path of header-files |
-I$ Unknown macro: {ALTIBASE_HOME}
/include | -I$ Unknown macro: {ORACLE_HOME}
/public -I$ /precomp/include -I$ Unknown macro: {ORACLE_HOME}
/oracore/public ... || Definition about path of library-files | -I$ | /lib |
-L$ Unknown macro: {ORACLE_HOME}
/precomp/lib -L${ORACLE_HOME}/lib ... || Library-files | -lapre -lodbccli | cat `${ORACLE_HOME}/lib/sysliblist` ... |* ORACLE sample Shell> proc iname=sample1.pc /precomp/public -L$ Unknown macro: {ORACLE_HOME}
/lib -lclntsh When compiling, User have to link system-libraries like "-lpthread -lm -ldl -lstdc++ -lcrypt -lrt". (Altibase provides only two-libraries like "libapre", "libodbccli") |
Connection
- ORACLE
- ALTIBASE HDB
Host Variables
- ORACLE
- ALTIBASE HDB
- If you uses a option (-parse=full), you can use host-variables without declare-section. (but, this is able to do it in c-style)
Embedded-SQL
See the follwoing pages linked as follows.
- Basic SQL (SELECT,INSERT, UPDATE, DELETE, CURSOR, MOVE)
- Call Procedure
- Dynamic Method
- Error-Handling
- LOBs-Handling
- Queue-Handling
Entries |
ALTIBASE HDB |
ORACLE |
Comments |
---|---|---|---|
File Extension |
source.sc |
source.pc |
|
Precompiler |
apre |
proc |
|
Header-File |
Not needed |
#include <sqlca.h> |
ALTIBASE HDB automatically writes a header-file while precompiling. |
Default Commit-Mode |
Auto-Commit |
Non Auto-Commit |
ALTIBASE can be using a property located at $ALTIBASE_HOME/conf/altibase.properties |
Fetch-Across-Commit |
Not Support |
Support |
|
Dynamic Method-4 |
Not Support |
Support |
|
Status Codes
- ORACLE
- ALTIBASE HDB