Home How To Online Documentation Support Download Order
 

 


Benefits
Examples
History
SQLAPI++ References
 

Quick download:

SQLAPI++ Win32

SQLAPI++ Linux

SQLAPI++ Sun SPARC Solaris







SQLAPI++ Library

SQLAPI++ is a C++ library for accessing multiple SQL databases (Oracle, SQL Server, DB2, Sybase, Informix, InterBase, SQLBase, MySQL, PostgreSQL and ODBC, SQLite). 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 Win32 Linux/Unix
Oracle Database Server Supported (OCI) Supported (OCI)
Microsoft SQL Server Supported (DB-Library, OLE DB) FreeTDS ODBC driver should be used
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
Centura (formerly Gupta) SQLBase Supported (CAPI) Supported (CAPI)
MySQL Supported (MySQL C API)  Supported (MySQL C API)
PostgreSQL Supported (libpq) Supported (libpq)
ODBC Supported Supported (iODBC, see www.iodbc.org)
SQLite
Supported
Supported

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

  • Microsoft Visual C++
  • Borland C++ Builder
  • GNU project C and 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.

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. Multithreading support and canceling queries

Advanced Examples

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

History

27 May 2009

Version 3.7.28 of SQLAPI++ library released.

New features:

  • SQLServer: Added SAConnection OLEDB options "CompactEdition.3.0" and "CompactEdition.3.5" (thanks Johannes Maly).
  • SQLServer: Fixed processing of 'real' and 'tinyint' field types for SQLCE (thanks Jacob Pedersen).
  • General: Linux/Unix, added SQLAPI_SOLARIS compilation option and fixed pthread compilation problem (thanks Bogdan Pytlik).
  • SQLServer: OLEDB, fixed bug with empty second result set at the same scrollable SACommand (thanks Bjoern Eggstein).
  • General: Linux/Unix, added SQLAPI_SCOOSR5 compilation option (implemented for SCO OpenServer 5.0.7 by Andrew Thornton).
  • General: Linux/Unix, removed stabs+ debug information format specification (thanks Andrew Thornton).
  • MySQL: Fixed bug when it was impossible to process several result sets those a procedure returns (thanks Klass, Markus).
  • Oracle: Added a code that uses new OCILogRead2 when available (thanks Jeff Huttel).
  • MySQL: Fixed problem with prepared statements and different MYSQL_BIND versions (thanks Alexander Petrossian).
  • General: Several performance improvements (thanks Mike Moening).
  • MySQL: Fixed bug with SA_UNICODE_WITH_UTF8 and text fields when statement API used (thanks Jason at goffconcepts.com).
  • DB2: Fixed bug with text fields (UNICODE version).
  • General: For 'SACommand::Field(const SAString &sField)' added the second cycle for the field searching by short name (thanks Felix Nawothnig).
  • Sybase: Fixed long text field reading (SA_UNICODE).
  • Sybase: Added ability to define procedure parameters when the procedure name includes its number (ASE, like 'procedure1;1', thanks Vlad Imshenetskiy).
  • Sybase: Added method to detect server type (ASA or ASE) to avoid any extra internal exception processing (thanks Vlad Imshenetskiy).
  • SQLServer: Added 2008 OLEDB client support.
  • SQLServer: Added 2008 new data type support (thanks Justin Matthews).
  • SQLServer: Added fixes those allows to use "ICommandPrepare" = "skip" with procedures (without preparing there was string data truncation, thanks Justin Matthews).
  • MySQL: Added using 'KILL QUERY' command instead of mysql_kill with MySQL version >= 5.0 (thanks Andrew Thornton).
  • General: Documentation improved (thanks Justin Matthews and Kaarel Odraks).
  • Oracle: Fixed double values binding - using SQLT_BDOUBLE rather then SQLT_FLT (thanks Alan Hardin).
22 January 2009

Version 3.7.27 of SQLAPI++ library released.

New features:

  • General: Now 'SANumeric::operator double() const' again uses strtod() variant but with '.' replaced by localeconv()->decimal_point (thanks Alasdair Richardson).
  • General: 'SAGlobals::UnloadAPI() = true' behavior fixed (thanks Christophe Benoit).
  • MySQL: Fixed bug at ImyCursor::MySQLEscapeString(), if If a string is passed in that only contains escapable chars (thanks Oliver Watson).
  • SQLServer: Fixed bug with scrollable statement reusing that results in wrong result set processing (thanks Alexander Horak).
3 December 2008

Version 3.7.26 of SQLAPI++ library released.

New features:

  • ODBC: Now SA_dtNumeric SQLAPI++ type is used by default for SQL_NUMERIC, SQL_DECIMAL and SQL_BIGINT (before SA_dtDouble was there)..
  • ODBC: Added new option SAConnection option ODBCUseNumeric.
  • PostgreSQL: Added support for SA_UNICODE_WITH_UTF8 build option (experimental).
  • Sybase: sybAPI::DefaultLongMaxLength method added to control max 'long' field size (when the using of ct_get_data is impossible).
  • Sybase: SAGlobals::SetSybaseMessageCallback method renamed/moved to sybAPI::SetMessageCallback (still EXPERIMENTAL).
  • InterBase: Added ability to use new Firebird fb_interpret call instead of unsafe isc_interprete (thanks Diane Downie).
  • General: SQLAPI++ parameters and fields buffers allocation optimized (thanks Jeff Huttel).
  • Sybase: CS_LOCALE connection option added.
  • SQLServer: Fixed bug with numeric parameter presicion (truncation, thanks Jean-Claude Chauve).
  • PostgreSQL: Fixed bug with SAParam::setAsULong (thanks Vlad Romascanu).
  • Sybase: Added 'date' type support for the stored procedure parameters (thanks Vlad Imshenetskiy).
  • Sybase: Fixed problem with the procedure parameters describing when procedure is located in another database (Georgiy Pakhutin).
  • ODBC: Added new connection options - SQL_DRIVER_PROMPT,SQL_DRIVER_COMPLETE,SQL_DRIVER_COMPLETE_REQUIRED,DSN.
  • SQLServer: Fixed bug with procedure preparation.
12 September 2008

Version 3.7.25 of SQLAPI++ library released.

New features:

  • General: saConnectionHandler_t callback added at SAConnection::Connect method.
  • SQLServer: SQLCE, "CreateDatabase" option added.
  • SQLServer: SQLCE, use SA_dtString program type for uniqueidentifier fields.
  • Oracle: Fixed memory leak when SYS_REFCURSOR parameters returns a cursor field (thanks mera.ru)
  • General: Added compilation option SA_UNICODE_WITH_UTF8. Used with MySQL to turn on utf-8 client character set for SA_UNICODE configuration.
  • General: SA_UNICODE configuration. Added SAString methods GetUTF8Chars, GetUTF8CharsLength, SetUTF8Chars.
  • Oracle: Fixed option processing OCI_ATTR_CHARSET_FORM=SQLCS_NCHAR for NCLOB binding (thanks Andreas Wenzel).
  • Oracle: Fixed binding(SA_UNICODE) CLOB procedure parameters (thanks Marcel Rassinger).
  • General: Fixed 'SANumeric::operator double() const' bug with locale settings those use a special character as a decimal delimiter instead of '.'.
  • SQLite: Added new API functions - sqlite3_threadsafe and sqlite3_last_insert_rowid.
  • SQLite: Fixed wrong API initialization (thanks Peter Klotz).
  • SQLite: Added "BusyTimeout" connection option.
  • General: Added version info into sqlapi.dll (thanks Frank Hilliger).
  • Sybase: SACommand::Cancel should work now (thanks Georgiy Pakhutin).
  • SQLServer: OLEDB, SACommand::Cancel works with multiple results (required SQLNCLI, thanks Georgiy Pakhutin).
  • SQLServer: OLEDB, the default value of "ICommadPrepare" option was changed to "skip".
  • Sybase: "SybaseResultType" and "SybaseResultCount" SACommand options added.
  • Sybase: SAGlobals::SetSybaseMessageCallback method added (EXPERIMENTAL, allows to process Sybase messages manually).
  • DB2: Added mapping DECFLOAT<->SA_dtString(thanks Dmitry Chaikovsky).
26 February 2008

Version 3.7.24 of SQLAPI++ library released.

New features:

  • MySQL: Connection options MYSQL_OPT_READ_TIMEOUT, MYSQL_OPT_WRITE_TIMEOUT and MYSQL_OPT_CONNECT_TIMEOUT added.
  • MySQL: Version 5.1 supported now.
  • Oracle: CLOB/BLOB truncation bug fixed.
  • Oracle: REFCURSOR memory leak problem fixed.
  • SQLite: Initial support for SQLite added.
  • ODBC: Added the special code for situations when the ODBC driver returns 0 bytes instead of SQL_NO_DATA (LongChar reading, thanks Frank Hilliger).
  • SQLServer: SQLOLEDB layer modified for Compact Edition 3.5.
  • SQLServer: Added Compact Edition specific options. Now CE layer is available at UNICODE version only.
  • DB2: Fixed the problem with column names (UNICODE version, thanks Adrian Studer).
  • General: Fixed the problem with the SANumeric rounding (thanks Mike Moening).
  • MySQL: Added SAInterval parameter processing (thanks Frank Hilliger).
12 October 2007

Version 3.7.23 of SQLAPI++ library released.

New features:

  • PostgreSQL: The error message includes the diagnostic trouble code now (thanks Helmut Ebersmann).
  • MySQL: Fixed bug with affected rows value (thanks Christoph Merten).
  • MySQL: Fixed bug with datetime/timestamp second part/fraction (thanks Helmut Ebersmann).
  • General: SACommand::ParseInputMarkers fixed for tabulator after parameter name (thanks Adrian Studer).
  • SQLServer: IssOleDbCursor::SetParameterInfo fixed for correct type name (thanks to Phillip at spectorsoft.com).
  • SQLServer: SQLOLEDB layer works with Compact/Mobile edition now (SQLAPI should be compiled with SA_UNICODE, thanks John Hague).
  • Sybase: New scheme of the client API libraries loading , SA_INCLUDES_SYBASE building parameter added (thanks Max Hales).
  • Sybase: CS_LOGIN_TIMEOUT and CS_TIMEOUT connection parameters added (thanks Beaty, Robert).
  • Oracle/General: Fixed issue with SANumeric/double conversion (thanks Adrian Studer).
  • Oracle: Fixed problem with CLOB and varying-width client-side character sets (UTF-8).
  • General: Build scripts updated. More samples are provided now.
25 June 2007

Version 3.7.22 of SQLAPI++ library released.

New features:

  • PostgreSQL: Fixed string escaping bug (buffer size too small, thanks combit.net).
  • SQL Server: Added statement preparation for each executing when option "ICommandPrepare" = "SetParameterInfo" used (thanks to Chris Hecker).
  • SQL Server: Fixed string parameters buffer size bug on x86_64/SQLOLEDB.
  • MySQL: Fixed access violation bug with fetching empty text field data (thanks Albert Perdon).
  • MySQL: Fixed bug with non-initialized statement handle (thanks Mario Lavalliere).
  • ODBC: The code modified to work correctly with long/blob fields under Linux and FreeTDS driver.
  • ODBC: SAConnection::isAlive() uses SQLGetConnectAttr/SQL_ATTR_CONNECTION_DEAD now.
  • SQL Server: Added SAConnection parameter "OLEDBProvider" (SQLOLEDB connection).
24 May 2007

Version 3.7.21 of SQLAPI++ library released.

New features:

  • Oracle: "APPNAME" SAConnection parameter added (OCI_ATTR_CLIENT_IDENTIFIER is used, thanks Frank Hilliger).
  • MySQL: Fixed bug with SAConnection::isAlive().
  • SQL Server: "ICommandPrepare" SACommand parameter value "SetParameterInfo" added (fixes KB235053).
  • MySQL: "UseStatement" SACommand parameter added (SQLAPI++ can use MySQL statement API now).
  • MySQL: Fixed long character type support with UNICODE.
  • Oracle: Fixed CLOB type support with UNICODE.
  • ODBC: Fixed access violation bug at IodbcConnection::Check (UNICODE, thanks Jay Sridhar).
  • DB2: Fixed possible access violation bug at Idb2Connection::Check (UNICODE).
30 March 2007

Version 3.7.20 of SQLAPI++ library released.

New features:

  • Sybase: Version 15.x support for Linux/UNIX (.so names changed - thanks Ronan O'Sullivan).
  • Oracle: Crash fixed with the OCIDateTime descriptor freeing.
  • DB2: Unicode support improved.
  • General: Added common SAConnection option: "APPNAME", "WSID" (they are supported for SQL Server and Sybase at the moment).
  • SQL Server (OLDEDB): Added SAConnection options SSPROP_INIT_FILENAME, SSPROP_INIT_ENCRYPT, SSPROP_INIT_WSID.
  • PostgreSQL: Added using of the PQescape* functions if they are available.
  • DB2: SA_dtString procedure parameter type is used for the LONG VARCHAR database type.
  • MySQL: Added support for multiple result set.
  • SQL Server (OLDEDB): x86_64 fixes.
  • DB2: All diagnostic messages are combined into SAException error text now.
  • Sybase: CS_HAFAILOVER connection parameter added.
  • General: Fixed a SADateTime::TmFromDate problem with the rounding.
  • DB2: XML type support added.
  • DB2: Fixed x86_64 support.


See Full History...


Last modified: 27 May 2009
webmaster@sqlapi.com