Data Access User Manual > Data Access and SQL > Connecting to a Database > Database Drivers
 
Database Drivers
The IliSQLSession class can be used to communicate with different database servers. To connect a session object to a given database server, the corresponding database driver must be included in the application executable file.
The database driver is included in the application at compile time. This can be done by adding the following code to the source file that contains the main() function:
#define ILDORACLE
#define ILDINFORMIX
 
#include <ildblink/dblink.h>
#include <ilviews/dataccess/dbms/session.h>
 
static IldDbms* ILVCALLBACK
CustomNewDbms(const char* dbms, const char* params) {
return IldNewDbms(dbms, params);
}
 
main(int argc, char* argv[])
{
IliSQLSession::SetNewDbmsFunction(CustomNewDbms);
}
This code extract specifies that the Oracle and Informix drivers are included in the application executable file.
The following list contains the macro symbols that must be defined in order to include the corresponding database driver.
*ILDDB2
*ILDORACLE
*ILDINFORMIX
*ILDSYBASE
*ILDOLEDB
*ILDMSSQL
*ILDODBC
Note: The Microsoft SQL Server , OLE DB and ODBC driver are only supported on Windows platforms.

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.