Home How To Online Documentation Support Download Order
 

 

 

Class Library

SACommand
SAConnection
SAException
SAField
SAParam
SAString
SADateTime
SANumeric
SAInterval

Enums and Typedefs

Server specific guide

Oracle
SQL Server
Sybase
DB2
Informix
InterBase
SQLBase
MySQL 
PostgreSQL 
ODBC
SQLite
SQL Anywhere


Online Documentation

The following sections are available here:

Instructions for Compiling SQLAPI++

Generally SQLAPI++ ships with some libraries already compiled. However we always recommend you recompile SQLAPI++ with the C++ compiler you use for your project/application. You should use appropriate batch file located in the src subdirectory of SQLAPI++ distribution (sqlapi_msvc.bat, sqlapi_bcc.bat, sqlapi_mingw.bat, sqlapi_gcc, sqlapi_ss). These files also allow to modify SQLAPI++ build options. Review the batch before you execute it  - you may need to configure compiler environment and SQLAPI++ build options.

Build options should be passed with 'make' tool command line:

General

CFG - specify what type of the configuration should be build (possible values: release, debug)
CFG_LINK
- specify the build procedure output type (possible values: dynamic, static)
SA_DEFINE
- always use SA_NO_TRIAL to avoid
SQLAPI_OS - should be specified for Linux/Unix platforms only (possible values: SQLAPI_LINUX(default), SQLAPI_SOLARIS, SQLAPI_AIX, SQLAPI_HPUX, SQLAPI_OSX, SQLAPI_SCOOSR5)
SA_64BIT - should be set if you'd like to build 64-bit SQLAPI++ binaries
SA_32BIT - should be set if you'd like to build 32-bit SQLAPI++ binaries

DBMS support

SA_CLIENT_ALL  -  build all available DBMS support
SA_CLIENT_IBASE  - build InterBase/Firebird support
SA_CLIENT_ODBC - build ODBC support
SA_CLIENT_ORACLE - build Oracle support
SA_CLIENT_SQLBASE - build SQLBase support
SA_CLIENT_INFORMIX - build Informix support
SA_CLIENT_DB2 - build DB2 support
SA_CLIENT_SYBASE - build Sybase support
SA_CLIENT_MYSQL - build MySQL support
SA_CLIENT_PGSQL - build PostgreSQL support
SA_CLIENT_SQLITE - build SQLite support
SA_NO_OLEDB - disable MSSQL DB-Lib client
SA_NO_OLEDB
- disable MSSQL OLEDB client
SA_NO_SQLNCLI - disable MSSQL SQLNCLI client

Features

SA_UNICODE - build Unicode library version
SA_USE_PTHREAD - build thread safe library (with pthread library, Linux/Unix only)
SA_PARAM_USE_DEFAULT - specify to use default parameter values with procedures (by default they are NULL)
SA_STRING_EXT - use modern SAString modifications

Compiling

SA_USE_PCH  - use precompiled headers
SA_INCLUDES_SYBASE - specify own Sybase ASE include folder
SA_RUNTIME- build the library with static or dynamic LIBC (Borland C++ and Microsoft Visual Studio only, possible values: dynamic,static)

Linking

SA_STATIC_DB2 - link SQLAPI++ with DB2 CLI library
SA_STATIC_ORACLE - link SQLAPI++ with Oracle OCI library
SA_STATIC_MYSQL - link SQLAPI++ with MySQL client library
SA_STATIC_SQLITE - link SQLAPI++ with SQLite client library
SA_STATIC_SYBASE - link SQLAPI++ with Sybase Open Client library
SA_MANIFEST_EMB - embedded manifest (Microsoft Visual Studio only)

Instructions for Compiling and Linking Applications with SQLAPI++

SQLAPI++ programs need the following components of the SQLAPI++ distribution:

Header files - Compile time

Programmers need to include the SQLAPI++ header files. Those with a command-line compiler will typically use options such as '/I%SQLAPIDIR%\include' or '-I${SQLAPIDIR}/include'. The header files are in the include subdirectory of SQLAPI++ distributions:

#include <SQLAPI.h> - main header, should be used whenever SQLAPI++ is used.
#include <ora7API.h>, <oraAPI.h> - Oracle API, should be included if direct OCI calls are required
#include <ssOleDbAPI.h> - SQLServer API, should be included if direct OLE DB calls are required
#include <ss6API.h> - SQLServer API, should be included if direct DB-Library calls are required
#include <db2API.h> - DB2 API, should be included if direct DB2 CLI calls are required
#include <infAPI.h> - Informix API, should be included if direct Informix CLI calls are required
#include <ibAPI.h> - Interbase API, should be included if direct InterBase API calls are required
#include <sbAPI.h> - SQLBase, should be included if direct CAPI calls are required
#include <sybAPI.h> - Sybase, should be included if direct Open Client calls are required
#include <myAPI.h> - MySQL, should be included if direct MySQL C API calls are required
#include <pgAPI.h> - PostgreSQL, should be included if direct libpq calls are required
#include <odbcAPI.h> - ODBC API, should be included if direct ODBC API calls are required
#include <sl3API.h> - SQLite API, should be included if direct SQLite API calls are required

Static or dynamic libraries - Link time

Programmers need to link with static or dynamic libraries.
Those with a command-line compiler will typically use options such as '/L%SQLAPIDIR%\lib sqlapi.lib' or 'or -L${SQLAPIDIR}/lib -lsqlapi'.

The libraries are in the lib subdirectory of SQLAPI++ distributions:

Windows:
sqlapi.lib - for linking with release version of dynamic library (MS Visual Studio C++)
sqlapid.lib
- for linking with debug version of dynamic library (MS Visual Studio C++)
sqlapis.lib - for linking with release version of static library (MS Visual Studio C++)
sqlapisd.lib - for linking with debug version of static library (MS Visual Studio C++)
sqlapib.lib - for linking with release version of dynamic library (Borland C++)
sqlapibd.lib - for linking with debug version of dynamic library (Borland C++)
sqlapibs.lib - for linking with release version of static library (Borland C++)
sqlapibsd.lib - for linking with debug version of static library (Borland C++)
libsqlapidll.a  - for linking with release version of dynamic library  (MinGW)
libsqlapiddll.a - for linking with debug version of dynamic library (MinGW)
libsqlapi.a - for linking with release version of static library (MinGW)
libsqlapid.a - for linking with debug version of static library (MinGW)

Linux/Unix:
libsqlapi.so - for linking with release version of dynamic library (GNU C and C++ project compiler)
libsqlapid.so - for linking with debug version of dynamic library (GNU C and C++ project compiler)
libsqlapi.a - for linking with release version of static library (GNU C and C++ project compiler)
libsqlapid.a - for linking with debug version of static library (GNU C and C++ project compiler)

Unicode versions of the libraries have 'u' suffix. To compile and link the application with Unicode SQLAPI++ library you must use SA_UNICODE define.

Dynamic Link Libraries (DLLs) - Run time

Users of programs built with the dynamic SQLAPI++ libraries need these same dynamic libraries to run the programs. The DLLs are in the bin subdirectory of SQLAPI++ distributions:

Windows:
sqlapi.dll - for programs linked with the release version of dynamic library (MS Visual Studio C++).
sqlapid.dll - for programs linked with the debug version of dynamic library (MS Visual Studio C++).
sqlapib.dll - this is release DLL for (Borland C++).
sqlapibd.dll - this is debug DLL for (Borland C++).
libsqlapi.dll - release library compiled (MinGW).
libsqlapid.dll - debug library compiled with (MinGW).

Dynamic libraries are made available to programs in places such as c:\windows\system on Windows platforms, in current folder or in the path.

Linux/Unix:
libsqlapi.so - for programs linked with the release version of dynamic library (GNU C and C++ project compiler).
libsqlapid.so - for programs linked with the debug version of dynamic library (GNU C and C++ project compiler).

Unicode versions of shared libraries have 'u' suffix.

SQLAPI++ sample projects

SQLAPI++ distribution includes samples subfolder with batch file (sqltest_mvc.bat, sqltest_bcc.bat, sqltest_mingw.bat, sqltest_gcc, sqltest_ss)  those can be used to build SQLAPI++ sample and test applications. You can also download ZIP archive with sample SQLAPI++ projects for Microsoft Visual Studio versions 6, 2005, 2088 and 2010: http://www.sqlapi.com/Download/MSVSSample.zip
There is also simple sample project for DevC++ (MinGW): http://www.sqlapi.com/Download/DEVCPPSample.zip


Last modified: 3 May 2014
webmaster@sqlapi.com