AnyDAC
ContentsIndexHome
PreviousUpNext
Connect to ODBC data source

Describes how to connect to ODBC data source.

Group
Links
Supported versions

The AnyDAC ODBC bridge driver supports ODBC Level 2, 3 drivers. 

 

Windows client software

AnyDAC requires that the x86 or x64 ODBC driver must be installed according to ODBC specification. You can find:

  • the portional list of ODBC drivers here.
  • the ODBC programming guide here.

 

Linux and Mac OS X client software

AnyDAC requires that UnixODBC must be installed. As the required ODBC drivers. 

 

Driver linkage

To link the driver:

 

Connection definition parameters

There are two basic ways to connect to the ODBC data source:

  • configure DSN using the ODBC Administrator control panel, then specify DSN name in the DataSource parameter;
  • set the ODBCDriver parameter value, then call Wizard.

Note, DataSource and ODBCDriver parameters are mutually exclusive. Each ODBC driver has its own set of connection parameters. They may be specified as the ODBCAdvanced parameter value. 

 

DriverID=ODBC  

Parameter 
Description 
Example value 
ODBCDriver 
The name of ODBC driver to use for connecting. If specified, other connection parameters must be specified in the ODBCAdvanced parameter. 
SQL SERVER 
ODBCAdvanced 
Allows to specify ODBC connection parameter name=value pairs. They must be separated by ';'. 
 
DataSource 
The name of the existing DSN to use for connecting. 
MySAPDB 
LoginTimeout 
Controls the amount of time (in seconds) an application waits for a connection attempt to timeout while waiting to establish a connection (0 specifies an infinite wait). 
30 
NumericFormat 
Controls the internal NUMBER binding mode. The 'Binary' is the most effective mode (default). But some ODBC drivers do not support binary mode correctly. In this case set the parameter to 'String'. 
String 
MetaDefCatalog 
Specifies the default catalog for the application. The design time code will omit the catalog name in object names, if it is equal to MetaDefCatalog. 
Northwind 
MetaDefSchema 
Specifies the default schema for the application. The design time code will omit the schema name in object names, if it is equal to MetaDefSchema. 
dbo 

 

Usage cases

 

  • Connect to PostgreSQL:

 

DriverID=ODBC
User_Name=postgres
Password=marlboro
ODBCDriver=PostgreSQL ANSI
ODBCAdvanced=SERVER=localhost;PORT=5432;DATABASE=addemo

 

  • Connect to Sybase Adaptive Server Enterprise:

 

DriverID=ODBC
ODBCDriver=Adaptive Server Enterprise
ODBCAdvanced=server=da;port=5000;quotedidentifier=1
Database=addemo
User_Name=sa
MetaDefCatalog=addemo
MetaDefSchema=dbo

 

  • Connect to Informix Dynamic Server:

 

DriverID=ODBC
ODBCDriver=IBM INFORMIX ODBC DRIVER
User_Name=informix
Password=informix2
Database=sysuser
ODBCAdvanced=HOST=DA;SRVR=ol_svr_custom;SERV=svc_custom;PRO=olsoctcp;CLOC=en_US.CP1252;DLOC=en_US.819
What do you think about this topic? Send feedback!