CopperSpice Overview
SQL Drivers

How to Configure and Install CsSql Drivers

The CsSql library uses plugins to communicate with the different database APIs. The API is the same for all databases. Several SQL drivers are supplied with CopperSpice and other drivers can be built as required.

Supported Databases

The table below lists the SQL drivers supported with CopperSpice. Due to GPL license restrictions not all of the plugins can be provided.


Driver Name DBMS Supported
QDB2 IBM DB2 Plugin
QIBASE Borland InterBase Plugin
QMYSQL MySQL Plugin
QOCI Oracle Call Interface Driver Plugin
QODBC Microsoft SQL Server & other ODBC compliant databases Plugin
QPSQL PostgreSQL Plugin
QSQLITE SQLite Built In


SQLite is an database system which is supported on all platforms and embedded in the CsSql library.

Oracle via OCI, PostgreSQL, and MySQL through an ODBC or a native driver are widely used on Linux, Mac OS X, and Windows. Support for these drivers depend on the availability of their client libraries.

To build a driver plugin for a given Database Management System (DBMS), the appropriate client library must be installed on your build system.

Building SQL Drivers

The CopperSpice build files script will automatically detect the availability of client libraries installed on your build computer. If configure detects a DBMS the appropriate CopperSpice SQL plugins will be built.

The CMake configure script may need additional parameters to specify the full path for the DBMS header files and library files. The following is an example for building the plugin driver for PostgreSQL on Windows.

// given PostgreSQL 10 is installed in "C:\Program Files\PostgreSQL\10\"
export PostgreSQL_ROOT="/c/Program Files/PostgreSQL/10"

Required Client Libraries

In addition to the SQL driver plugin, additional files may be also be required. As an example, for PostgreSQL 10 on Windows, the following DLL is needed and must be copied to your deploy folder. The exact files your application will require depends on your OS and the version of the DBMS.

  • libpq.dll

Additional Information

The following information explains the basic concepts for each DBMS.