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 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 (ODBC, OLE DB, DB-Library) 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 Supported (MySQL C API)  Supported (MySQL C API)
PostgreSQL Supported (libpq) Supported (libpq)
ODBC Supported Supported (iODBC, unixODBC)

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


30 October 2013

Version 4.1.2 of SQLAPI++ library released.

New features:

  • DB2: Use SQL_SSHORT instead of SQL_BIT data binding for SA_dtBool parameters (thanks Frank Hilliger).
  • MySQL: Added per-connection query execution mutex+lock.
  • MySQL: Added mysql_library_init call that resolves thread bug (thanks Michael Hufer and Frank Hilliger).
  • ODBC: Fixed the first character truncation of long/clob text field on Linux/Unix.
  • General: Renamed all names with suffix Win32 to Windows one.
  • ODBC: Added build option to configure SQLWCHAR type on Linux/Unix (thanks Christian Schmitz).
  • DB2: Fixed 64-bit SQLLEN/SQLPOINTER and related types data length (thanks Frank Hilliger).
  • PostgreSQL: Fixed long binary/blob binding (thanks slv1970 at me.com).
  • General: Addded ability to trace the real query text sent to DBMS API (experimental, SAGlobals::SetTraceFunction).
24 May 2013

Version 4.1.1 of SQLAPI++ library released.

New features:

  • General: SAString method GetUTF16Chars, GetUTF16CharsLength, SetUTF16Chars available in not-Unicode version.
  • SQLServer: Added support for Microsoft ODBC Driver 11 for SQL Server on Linux.
  • Informix: Fixed bug with data type conversion (thanks Jay Sridhar).
  • InterBase: Fixed the 64-bit DLL name (thanks Junior Tcheho).
  • SQLServer: Fixed problem with binding result set fields after any long/LOB one.
  • General: Fixed ODBC/CLI scrollable cursor fetching with row prefetched > 1 (DB2, Informix, ODBC, MSSQL affected).
  • Oracle: Added "NLS_CHAR" connection option.
  • PostgreSQL: Fixed long binary/blob binding (thanks Yan Dai).
  • General: Fixed 'SANumeric::operator sa_uint64_t()' for Windows (thanks Junior Tcheho).
  • DB2: Removed assertion when SQLGetDescRec is not exported by DB2 ODBC/CLI library (thanks Jesús Malo Poyatos).
  • DB2: Added workaround for incorrect 64-bit SQLDescribeCol (thanks Jesús Malo Poyatos).
  • General: Added 'SetCursorName' SACommand option for ODBC/CLI API-s that uses SQLSetCursorName function (thanks Christian Schmitz).
20 December 2012

Version 4.0.3 of SQLAPI++ library released.

New features:

  • Informix: Added Unicode support.
  • SQLServer: Use ODBC API by default instead of OLEDB, ODBC client allowed with MinGw.
  • General: Fixed bug with dummy data converter that can produce LOB/Long data reading problems (thanks Peter Klotz).
  • SQLite: Start transaction indirectly before the first query executed (thanks Frank Hilliger).
  • Sybase: Added 15.7 context support.
  • DB2: Fixed LOB/LONG field reading (thanks Fernand Alcatrao).
  • SQLServer: ODBC API, fixed bug with connection string parsing (thanks Hide Ishikuri).
  • Sybase: Don't using read only cursor by default (thanks Ian Hodgkinson).
  • DB2: Use trusted connection when username is empty.
  • General: Fixed procedure parameters binding (thanks Joel Baby Jose).
  • ODBC: Added Unicode support for Linux/Unix.
  • SQLite: Added #ifdef-#endif for static sqlite3_table_column_metadata (thanks Jesus Malo Poyatos).
  • PostgreSQL: Added PQping/PQpingParams API functions.
  • PostgreSQL: Fixed connection code bug when application name specified (thanks Alexander Horak).
  • SQLite: Fixed problem with string data conversion in Unicode version (thanks Jacob Pedersen).
29 October 2012

Version 4.0.2 of SQLAPI++ library released.

New features:

  • General: Fixed SAString binary length calculation (thanks Christian Schmitz).
  • PostgreSQL: Added support for executing PostgreSQL function.
  • General: Bind variable can start with '_' and comment processing added ('--' until end-of-line and /* .. */, thanks Georgiy Pakhutin).
  • PostgreSQL: Added processing for PQsetdbLogin pgoptions parameter passed with the connection string.
  • SQLServer: Added DBPROP_SSCE_DBCASESENSITIVE connection optioon for CompactEdition (thanks Jacob Pedersen).
  • ODBC: Binary field Interpreted as a long binary if the column size is 0 (thanks Scott at touchnet).
  • DB2: Added Unicode support for Linux/Unix (thanks Jonathan González Encarnación).
  • Sybase: Added timeout message processing into callback function (CS_TIMEOUT works now, thanks Michael Graf).
  • SQLite: Added sqlite3_table_column_metadata API fuinction.
  • MySQL: Added function support.
  • General: Fixed using wcscasecmp for MacOS X (thanks Christian Schmitz).
  • MySQL: Fixed procedure/function parameters parsing (thanks icqwjj).
  • InterBase: Fixed query preparing and executing with national symbols, Unicode version (thanks Petr Liska).
  • SQLServer: Fixed IssNCliCursor::ConvertString and IssOleDbCursor::ConvertString virtual methods(thanks Petr Liska).
  • Sybase: Fixed IsybCursor::ConvertString virtual method.
  • InterBase: Fixed IibCursor::ConvertString virtual method.
  • SQLite: Fixed SACommand::isResultSet always returns true.
  • General: Fixed SAString::SetUTF16Chars method (avoid crash when the source string is NULL).
  • General: Avoided double conversion of UTF-8 and UTF-16 data (SA_STRING_EXT required, thanks Christian Schmitz).
  • General: Fixed UTF-16 code (wrong conversion).
  • General: SONAME added for the shared library (thanks Pobinger Gerhard Stefan).
1 June 2012

Version 4.0.1 of SQLAPI++ library released.

New features:

  • General: SA_MINDEP build option replaced with SA_RUNTIME=(dynamic|static).
  • MySQL: Fixed VARCHAR field data truncation with statement API (thanks Abhay Rawat).
  • Oracle: Fixed NCLOB/NCHAR/NVARCHAR reading for UTF16 encoding.
  • General: Unicode Linux/Unix configuration is supported now (except ODBC).
  • General: Certain SAString methods return SIZE_MAX now instead of (-1).
  • General: Changed all internal buffer size types for size_t.
  • PostgreSQL: Fixed time string parsing(thanks Andrew Smolko).
  • PostgreSQL: Fixed string escaping.
  • ODBC: Fixed SQLDriverConnect related bug (thanks Mike Moening).
  • SQLite: Added backup API functions (thanks Dave Fileccia).
  • General: SADateTime default constructor is public again.
  • General: SAValueRead::asInterval() method substracts SADateTime(0.0) from SA_dtDateTime value instead of the current time.
  • SQLite: Added "SQLiteTransactionType" connection option (thanks Frank Hilliger).
  • SQLServer: Ready for SQL Server 2012 Native Client.
  • Oracle: Function returned value parameter name changed from "Result" to "RETURN_VALUE".

See Full History...

Last modified: 30 October 2013