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

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)
PostgresSQL Supported (libpq) Supported (libpq)
ODBC Supported Supported (iODBC, unixODBC)
SQLite Supported Supported
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
SQLAPI++ Benefits
  • SQLAPI++ directly calls native API's of target DBMSs (unlike ADO which uses OLEDB and/or ODBC intermediate layer).
  • 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, one year bugs fixing and new version updates.
Examples
Steps
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. Multi-threading support and canceling queries
Advanced Examples

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

History
17 October 2019

Version 5.0.1 of SQLAPI++ library released.

New features:

  • CubeSQL: Added cubeSqlAPI::Check method.
  • General: Fixed SAPI/SAConnection loading (thanks Jacob Pedersen, Baerten Manuel and Jian Zhang).
  • General: Fixed SAPI/SAConnection destroying (thanks Baerten Manuel).
  • General: IBM XLCbuildscript fixes (thanks Frank Hilliger).
  • MySQL: New "UseMySQLKillQueryConnection" option fixes SACommand::Cancel problem (thanks Frank Hilliger).
  • Sybase: Fixed crash after connection failed.
  • PostgreSQL: Fixed API loading (thanks David Bárcena Hilario).
20 September 2019

Version 5.0.0 of SQLAPI++ library released.

New features:

  • CubeSQL: Added 'data' API functions.
  • CubeSQL: New connection option supported "SSLCertificatePath" and new SSL related values for "ConnectionEncryption" (thanks Christian Schmitz).
  • ODBC: Do not check the result of SQL_ATTR_ROW_ARRAY_SIZE statement attribute set (thanks Christian Schmitz).
  • SQLServer (OLEDB): Fixed the second call of SAConnection::Connect method (thanks Michael Soliman).
  • MySQL: Prevent buffer allocation for LONG/LOB data when procedure parameters described (thanks Johannes Lipp).
  • General: Fixed SAString constructors provided by SA_USE_STL build option (thanks Michael Soliman).
  • Oracle: Added OCI direct path functions.
  • General: SA_Snapshot isolation level value added.
  • DB2: Use universal command for SACommand::isAlive method (thanks Frank Hilliger).
  • Informix: Do not use ODBC64 by default for 64-bit platforms but use SA_INFORMIX_ODBC64 build option.
  • DB2: Do not use ODBC64 by default for 64-bit platforms but use SA_DB2_ODBC64 build option (thanks Frank Hilliger).
  • MySQL: Use INFORMATION_SCHEMA.PARAMETERS for getting function/procedure parameters.
  • Oracle: Fixed external connection handles attaching (thanks Frank Hilliger).
  • General: Added SAPI class added - DBMS API abstraction class that allows to use several API versions or the same DBMS client.
  • SQL Anywhere: Crashing fixed when result set navigated (thanks Christian Schmitz).
  • SQL Anywhere: Added scrollable cursor support.
  • ODBC: Removed SAException throwing when it cannot load some unused API functions (thanks Christian Schmitz).
  • SQL Server: Removed DB-Library support.
  • Oracle: Removed OCI7 support.
  • ODBC: "ODBCUseBigint" connection option added.
  • General: sa_strncpy/sa_wcsncpy related fixes (thanks Manuel Baerten).
  • General: SA_dtInt64 and SA_dtUInt64 value types added.
27 February 2019

Version 4.2.5 of SQLAPI++ library released.

New features:

  • General: Fixed parameter by name searching (thanks Frank Hilliger).
  • SQL Anywhere: Fixed API initialization on Linux/Unix (thanks Christian Schmitz).
  • General: Use safe CRT/LIBC functions when available.
  • SQLite: Fixed default date/time type search option value (thanks Christian Schmitz).
  • General: Added SAException::CommandText() method.
  • General: Fixed STATIC DBMS API loading (thanks Manfred Kubica).
  • SQLServer (OLEDB): Fixed bug with multiple connections.
  • ODBC: API code reorganized.
  • PostgreSQL: Added support for stored procedures.
  • General: Throw SAException instead or assertion when required DBMS API function cannot be loaded.
  • PostgreSQL: Do not destroy the result set returned by function so it's possible to process for example 'return table...' results (thanks Mike Moening).
  • PostgreSQL: Improved function/procedure parameters detection for the current/default schema (thanks Mike Moening).
  • ODBC: Increased the field/parameter length that should be converted to SA_dtString (helps with some buggy drivers, thanks Christian Schmitz).

See full history...

Last modified: 19 October 2019
webmaster@sqlapi.com