Home How To Online Documentation Support Download Order


SQLAPI++ References

Quick download:

SQLAPI++ Windows

SQLAPI++ Linux



SQLAPI++ Solaris x86


SQLAPI++ Library

SQLAPI++ is a C++ library for accessing multiple SQL databases (Oracle, SQL Server, DB2, Sybase, Informix, InterBase, SQLBase, MySQL, PostgreSQL, SQLite, SQL Anywhere and ODBC). It uses native APIs of target DBMS so applications developed with SQLAPI++ library run swiftly and efficiently. The product also provides a low-level interface that allows developers to access database-specific features. By encapsulating a vendor's API, SQLAPI++ library acts as middleware and delivers database portability. See details on supporting SQL database servers on different platforms:

Server Windows Linux/Unix
Oracle Database Server Supported (OCI) Supported (OCI)
Microsoft SQL Server Supported (SQLNCLI/ODBC, OLE DB, DB-Library) SQLNCLI/ODBC for Linux x86-64, otherwise ODBC driver and connection should be used (FreeTDS, Easysoft,...)
Sybase Supported (Open Client, ASE & ASA) Supported (Open Client, ASE & ASA)
DB2 Supported (DB2 CLI) Supported (DB2 CLI)
Informix Supported (Informix CLI) Supported (Informix CLI)
InterBase/Firebird Supported Supported
SQLBase Supported (CAPI) Supported (CAPI)
MySQL, MariaDB Supported (MySQL C API)  Supported (MySQL C API)
PostgreSQL Supported (libpq) Supported (libpq)
ODBC Supported Supported (iODBC, unixODBC)
Sybase SQL Anywhere
Supported (SQL Anywhere C API)
Supported (SQL Anywhere C API)

Currently SQLAPI++ library supports the following C/C++ compilers:

  • Microsoft Visual C++
  • Embarcadero (Borland) C++
  • GNU GCC C++ compiler
  • Solaris Studio C++ compiler

Why use SQLAPI++?

  • SQLAPI++ directly calls native API's of target DBMSs (unlike ADO which uses OLEDB and/or ODBC intermediate layer). That's why SQLAPI++ is the fastest way to manage you data.
  • No need (vs ADO) to install and configure OLEDB and/or ODBC drivers when developing and distributing your applications.
  • Low-level interface that allows developers to access database-specific features.
  • SQLAPI++ ships with all the sources.
  • Free lifetime support, bugs fixing and new version updates.



Step 1. Connecting to database (and error handling)
Step 2. Executing a simple SQL command
Step 3. Binding input parameters
Step 4. Executing a select query (and fetching result set)
Step 5. Binding LongBinary, LongChar, BLob and CLob data
Step 6. Fetching LongBinary, LongChar, BLob and CLob data
Step 7. Multithreading support and canceling queries

Advanced Examples

Using Oracle REF CURSORs
Using Oracle nested cursors
Fetching records in bulk


4 October 2016

Version 4.1.10 of SQLAPI++ library released.

New features:

  • General: Fixed SAInterval internals.
  • MySQL: Fixed statement API SA_dtInteral binding (thanks Sophia Wang).
  • SQL Anywhere: Fixed bug with prepared statement execution (thanks Brad Blankenburg).
  • SQLite: Added sqlite3_load_extension and sqlite3_free API functions.
  • MySQL: Fixed bug with the first SACommand::FetchPrior() call (thanks Dave Sulentic).
  • PostgreSQL: Ignore unknown date/time formats (thanks Maria Harmon).
  • MySQL: For multi-thread version try to load also MYSQL client lirary name without "_r" suffix (thanks Michael Noe).
  • General: Added SA_STATIC_PGSQL build option.
  • MySQL: Added MYSQL_SHARED_MEMORY_BASE_NAME connection option.
4 May 2016

Version 4.1.9 of SQLAPI++ library released.

New features:

  • Oracle: Fixed bug with CLOB reading and using multi-byte client encoding (thanks Peter Klotz).
27 April 2016

Version 4.1.8 of SQLAPI++ library released.

New features:

  • Sybase: Fixed bug with ASE 16.x version detection (thanks Frank Hilliger).
  • General: Fixed utf8.c code for correct results with and without output buffer, Unicode 3.0 standards (thanks Peter Klotz).
  • General: Fixed SAComand::Field(index) throws SAException when index is wrong (Christian Schmitz).
  • PostgreSQL: fixed using "APPNAME" connection option when connection string dbname already includes other options.
  • Oracle: try to get the LOB size before read.
  • General: added missed 'SAValueRead::operator SANumeric() const' body (thanks Balázs Kádár).
  • General: fixed SIZE_MAX definition bug (thanks Peter Klotz).
  • General: Fixed the SAString::SetUTF16Chars method for correct new []/delete [] (thanks Matt Feemster).
23 December 2015

Version 4.1.7 of SQLAPI++ library released.

New features:

  • General: Fixed the query text comments parsing (thanks Georgiy Pakhutin).
  • SQLServer(OLEDB): Fixed zero-scale numeric reading for SQLCE (thanks Gerardo Goitiandia)
  • Oracle: fixed INTERVAL data reading (thanks Leo Namuco).
  • SQLite: fixed binding 64-bit integer parameters (thanks Balázs Kádár).
  • MySQL: ignore missed myodbc_remove_escape.
24 October 2015

Version 4.1.6 of SQLAPI++ library released.

New features:

  • ODBC: added ODBCAddLongTextBufferSpace command option (thanks Christian Schmitz).
  • PostgreSQL: fixed function parameters reading.
  • SQLite: added sqlite3_key and sqlite3_rekey API functions (thanks Christian Schmitz).
  • Oracle: connection pool support (EXPERIMENTAL).
  • SQLServer(ODBC): Fixed LOB output procedure parameter reading.
  • Informix: Ignore unknown data types (set field value to NULL).
  • DB2: Ignore unknown data types (set field value to NULL).
  • SQLBase: Ignore unknown data types (set field value to NULL).
  • ODBC: Ignore unknown data types (set field value to NULL).
  • General: Use specific internal SQLAPI library error native codes.
  • General: Added SAException& SAException::operator=(const SAException &other) (thanks Georgiy Pakhutin).
  • MySQL: Added ability to use named pipes connection.
  • DB2: Fixed bug with LONG/LOB 'NULL' field detection on 64-bit platfroms (thanks Frank Hilliger, also fixed for Informix, ODBC and SQLServer/ODBC).
5 May 2015

Version 4.1.5 of SQLAPI++ library released.

New features:

  • Oracle: Added OCI_ATTR_RECEIVE_TIMEOUT, OCI_ATTR_SEND_TIMEOUT conection options.
  • SQLServer(ODBC): Fixed datetime parameter precision issue (thanks Balázs Kádár).
  • PostgreSQL: Fixed SADateTime to internal format conversion at 64-bit (thanks Stefan Csomor).
  • General: Support for MinGW64.
  • InterBase: Fixed LOB reading/writing bug (thanks Pascal Geenens).
  • Oracle: Added ora8ExternalConnection class (thanks Frank Hilliger).
  • General: Fixed SAException constructor for correct nested exception copying (thanks Martin Rötzl).
  • MySQL: Added microseconds support (thanks Javier Cuevas Domingo).
  • General: Added SACommand::FetchPos method (EXPERIMENTAL).
  • Oracle: Added timezone support with SADateTime (thanks Frank Hilliger).
  • General: Added timezone information into SADateTime class (thanks Frank Hilliger).
  • Oracle: Fixed Long/LOB reading issues at multi-threading applications (thanks Niklas Bergh).
  • ODBC: Fixed the error message/code assigning for some drivers (thanks Christian Schmit).
  • SQLite: Fixed the error processing issue at multi-threading applications (thanks Niklas Bergh).
  • Mysql: Added connection option "SkipServerInit" (thanks Pierre-Yves Thomas).
  • SQLite: Added sqlite3_enable_load_extension API function.
18 October 2014

Version 4.1.4 of SQLAPI++ library released.

New features:

  • MySQL: Added support for libmysqlclient.so.18 (thanks Christian Schmitz).
  • MySQL: Fixed user function execution when there is no any input parameter (thanks Sebastian Hempel).
  • PostgreSQL: Fixed the connection error text for SAException (thanks Jesus Malo Poyatos).
  • SQLServer: OLEDB+ODBC API, ignore unknown data types (set field value to NULL).
  • General: Added SAException::NestedException() and SAException::ErrMessage() methods.
  • MySQL: Added SSL parameter used with mysql_ssl_set (thanks Christian Schmitz).
  • General: Added checking the memory allocation result and throwing an exception when allocation fails.
  • General: Fixed problem with IPv6 address using in MySQL and PostgreSQL connection strings (thanks Sridhar Gollapudi).
  • Informix: Fixed long/lob binding (thanks Christian Schmitz).
  • General: Fixed millisecond calculation in SADateTime::GetTimeValue(SYSTEMTIME &st) method (thanks Jocelyn Pelletier).
  • ODBC: Fixed procedure support for sources without schema support (thanks Joris Koster).
  • SQLServer: OLEDB API, added support for ISQLServerErrorInfo (thanks Georgiy Pakhutin).
  • SQLServer: OLEDB API, added support for SACommand::setBatchExceptionPreHandler (thanks Georgiy Pakhutin).
  • General: Added pAddlData parameter for SACommand::setBatchExceptionPreHandler (thanks Georgiy Pakhutin).
3 May 2014

Version 4.1.3 of SQLAPI++ library released.

New features:

  • SQLite: Added ReadLongOrLob support (thanks Jeremy A. Ford).
  • General: Fixed multi-byte(including UTF-8) to Unicode converter.
  • General: Added initial support for SQL Anywhere.
  • SQLite: Added sqlite3_update_hook API function.
  • MySQL: Added 'MYSQL_SECURE_AUTH' connection option (thanks Christian Schmitz).
  • Oracle: Fixed LONG data type reading/writing with Unicode version (thanks Jimmy Michiels).
  • SQLite: Optimized integer data reading (thanks Christian Schmitz).
  • General: Use -fPIC(g++)/-KPIC(Solaris Stidio) compilation option even for the static 64-bit library (thanks Christian Schmitz).
  • Oracle: Fixed crash if using Oracle database with LDAP configuration and OpenLDAP (thanks Alfred Gebert).
  • PostgreSQL: Do not use utf8 encoding for the error messages when the connection is bad (thanks jonathan.gonzalez at kepler.com.mx).
  • ODBC: Fixed procedure parameter parsing (thanks Joris Koster).
  • ODBC: Fixed SANumeric data processing (thanks Max Lipshits).
  • ODBC: Added SACommand option "ODBCUseSQLGetData" (use SQLGetData for any result set fields).
  • ODBC: Use SQLGetData for any field in the result set after long/LOB field.
  • General: Fixed empty string data returned with SAString::GetUTF16Chars (thanks Christian Schmitz).

See Full History...

Last modified: 4 October 2016