Skip to end of metadata
Go to start of metadata

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++.

Full Size

In the above figure,

  1. 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")
  2. 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)
  3. User compiles and links an object with altibase-libraries and system-libraries. altibase libraries are libapre.a and libodbccli.a
  4. 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
as a result of the APRE precompiling operation.

-o output_path

 

This is used to specify the location of the file(s) created by APRE.

-mt

THREADS=

Unknown macro: {yes|no}

If the file to be precompiled is a multi-threaded program,
this option must be specified.

-I include_path

INCLUDE option

This option is used to specify the location(s) of the header file(s)
to be used in the precompiling operation.

-parse

PARSE=

Unknown macro: {none|partial|full}


This option is used to specify the range within the source file(s),
which are specified within the source code using the #include directive,
that is parsed by the precompiler. When this option is not specified,
it is set to partial by default.

-D

No option

This option is used to specify the name of a macro
during the precompile operation.

-n

No option

This option is used to indicate that any host variables of type CHAR are not null-padded.

-unsafe_null

UNSAFE_NULL=


This option is used to prevent an error from being raised
even when a NULL value is fetched and an indicator variable is not being used.

-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
variables using the Altibase national character set.

-nchar_utf16

UTF16_CHARSET

When this option is used, national character type data are
encoded as UTF-16 during the precompile operation.

  • 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
Shell> gcc -m64 -o sample1 sample1.c -I$

/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

See this page

  • ORACLE 
  • ALTIBASE HDB

Host Variables

See this page

  • 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.

  1. Basic SQL (SELECT,INSERT, UPDATE, DELETE, CURSOR, MOVE)
  2. Call Procedure
  3. Dynamic Method
  4. Error-Handling
  5. LOBs-Handling
  6. 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

See this page

  • ORACLE 
  • ALTIBASE HDB 
  • No labels