CppDB
CppDB - ODBC bridge - "odbc"

ODBC backend allows to connect to almost any existing SQL database via ODBC driver and provides much more convenient interface that ODBC C API.

Unlike other backends, this one is not loaded dynamically by default but rather linked directly to cppdb library.

Connection String

The driver name is "odbc", but the cppdb::session::engine() returns "unknown" unless "@engine" property is specified.

Connection Properties are passed as is into ODBC connection string, so for example for connecting to some database you may just simply specify:

odbc:DSN=MySource;UID=myuser;PWD=secret

However there are several additional internal properties that define how cppdb treats the ODBC connection:

Implementation Details

Both prepared statements use SQLPrepare API and unprepared statements use SQLExecDirect API. All data is fetched using SQLGetData in order to support variable text length.

Following statements are used for fetching last insert id:

If the engine is not one of the above and "@sequence_last" property is not defined the cppdb::not_supported_by_backend exception would be thrown.

cppdb::session::escape() functionality is not supported as actual escaping rules vary by the specific RDBMS and attempt to use them would cause cppdb::not_supported_by_backend exception.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator