OCILIB

OCILIB
OCILIB
Ocilib-Logo-160x120.png
Developer(s) Vincent Rogier
Stable release 3.9.1 / July 8, 2011; 3 months ago (2011-07-08)
Written in C
Operating system Cross-platform
Type API
License GNU LGPL
Website http://www.ocilib.net/

OCILIB is an open source and cross platform Oracle C library that delivers fast and reliable access to Oracle databases.

The OCILIB library :

  • offers a rich, full featured and easy to use C API
  • runs on all Oracle platforms
  • is written in pure ISO C code with native ISO C Unicode support
  • encapsulates OCI (Oracle Call Interface)
  • is the most complete available OCI wrapper[citation needed]

OCILIB is used in applications written in various languages such as C, C++, Objective-C, Erlang, Lisp, PureBasic, Blitz BASIC, and others.

Contents

Compatibilities

OCILIB runs on any 32 bits and 64 bits platform having an ISO C compliant compiler and supported by Oracle.

Here is the lists of validated configurations.

Platforms

Compilers

  • Microsoft C/C++ compilers
  • GCC, MinGW
  • IBM XL C
  • Intel compilers
  • LabView
  • Various CCs

Features

Library

  • Pure ISO code (ANSI / Wide string)
  • Easy API (JDBC's like)
  • Cross platform
  • Compatible with all Oracle versions >= 8i
  • Full Unicode support (UTF8 and UTF16)
  • Supports static / shared oracle linkage
  • Supports runtime loading of Oracle shared libraries
  • Error handling (global and thread contextual)
  • Small memory usage

Datatypes

OCILIB supports all Oracle SQL and PL/SQL datatypes :

  • Scalar types : CHAR, VARCHAR, VARCHAR2, NUMBER, FLOAT, ...
  • binary types : RAW, LONG RAW, VARRAW, ..
  • Larges Objects : BLOB, CLOB, NCLOB, BFILE, CFILE
  • LONG types: LONG, VAR LONG, ...
  • Date, Timestamps and Intervals : DATE, TIMESTAMP, INTERVAL
  • PL/SQL types : Ref cursors, PL/SQL Tables
  • Objects (Named Types) and Objects references (REFs)
  • SQL Collections : VARRAYs and Nested Tables
  • ROWIDs and UROWIDs

Features

  • Easy and complete API providing more than 600 functions
  • Full support for OCI relational API
  • Full support for OCI object API
  • Host variable binding
  • Array interface binding and batch errors handling
  • Oracle connection and session pools
  • Scrollable cursors
  • Direct Path loading
  • Oracle Advanded Queues(Oracle AQ)
  • Oracle XA connectivity (X/Open Distributed Transaction Processing XA interface)
  • Oracle TAF (Transparent Application Failover) and HA (High availabality) support)
  • Oracle SQL "Returning into" DML feature
  • Binding array Interface
  • Scrollable statements
  • Statement cache
  • Startup/shutdown remote Oracle instances
  • Oracle Database Change notification / Continuous Query Notification
  • Oracle warnings support
  • Global transactions
  • Provides Hash tables support
  • Provides portable threads and mutexes API
  • Describe database objects

Documentation

Tutorials

Example

Example of a complete minimal OCILIB application :

#include "ocilib.h"
 
int main(int argc, char *argv[])
{
    OCI_Connection* cn;
    OCI_Statement* st;
    OCI_Resultset* rs;
 
    OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT);
 
    cn = OCI_ConnectionCreate("db", "usr", "pwd", OCI_SESSION_DEFAULT);
    st = OCI_StatementCreate(cn);
 
    OCI_ExecuteStmt(st, "select intcol, strcol from table");
 
    rs = OCI_GetResultset(st);
 
    while (OCI_FetchNext(rs))
    {
        printf("%i - %s\n", OCI_GetInt(rs, 1), OCI_GetString(rs,2));
    }
 
    OCI_Cleanup();
 
    return EXIT_SUCCESS;
}

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Oracle Call Interface — In computing, the Oracle Call Interface (OCI) consists of a set of C language software APIs which provide an interface to the Oracle database. OCI offers a procedural API for not only performing certain database administration tasks (such as… …   Wikipedia

  • MySQL DataController — Plugin Storage Engine Original author(s) Francis Lavalliere Initial release 2010 Operating system Linux, Mac OS X, Unix; Windows Platform …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”