OraLib - a lightweight C++ wrapper over Oracle's OCI library
<< TOC >>
OraLib, Introduction
OraLib is a lightweight C++ wrapper over Oracle's OCI library.
Features
- execution of DDL, SQL and PL/SQL statements;
- input/output named variables, including REF CURSOR type;
- supports (Unicode) text, numeric, date/time and cursor data;
- based directly on OCI;
- portable; includes (but is not limited to) support for:
Microsoft Visual Studio 6.0, Borland C++ 5.5 and MinGW 1.1;
- object-oriented C++ design - easy to use.
Quick example
#include "oralib.h"
void main (void)
{
oralib::connection cn;
cn.open ("server_name", "scott", "tiger");
cn.execute ("create table temp_table ( n numeric )");
cn.execute ("insert into temp_table values (1)");
oralib::resultset &rs = *cn.select ("select * from temp_table");
// ...
rs.release ();
cn.execute ("drop table temp_table");
}
Contents
- OraLib, Compatibility
Compatibility with compilers, OSes and Oracle versions
(Compilers, Platforms, Oracle versions, Supported data types)
- OraLib, Examples
SQL and PL/SQL statements execution examples, OraLib port of cdemo81.c
(SQL select statement example, PL/SQL block example, Named variables (or parameters), OraLib port of cdemo81.c)
- OraLib, An Article
OraLib article, as it has been submitted to The Code Project and Code Guru
(Introduction, Connection handling, Executing commands, Use-case examples, Alternatives, Some final words, Disclaimer)
- OraLib, Downloads
Disclaimer, source code and documentation and required packages download and feedback
(Disclaimer, Source code and documentation download, Feedback)
- OraLib, Links
Misc links and links to OraLib alternatives
(Misc links, OCI itself, OCCI - Oracle's own C++ library, OTL: Oracle, ODBC and DB2-CLI Template Library, OCI C++ Library, ORA++, OCI++: Oracle Call Interface ++ (AKA OCIWRAP), libsqlora8: Easy C-Interface to Oracle, Ask Google!)