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 x32 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.

 

Driver linkage

To link the driver:

 

Connection definition parameters

Each ODBC driver has its own set of connection parameters. The AnyDAC/ODBC bridge driver allows to specify them in the ODBCAdvanced parameter. There are two simple 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.

 

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 any other additional ODBC connection parameter values. 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 
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!