skip to main content
Configuring Hybrid Data Pipeline Driver for ODBC : Connecting applications to the connectivity service : File data sources
  

Try Now

File data sources

A file data source is simply a text file that contains connection information. It can be created with a text editor. The file normally has an extension of .dsn. The advantage of a file data source is that it can be stored on a server and accessed by other machines, either Windows, UNIX, or Linux.
The Driver Manager on UNIX and Linux supports file data sources. On Windows systems, you can use the ODBC Administrator to create a file data source. See Getting started with the ODBC Driver for a general description of ODBC data sources on both Windows and UNIX.
The file data source is accessed by specifying the FILEDSN instead of the DSN keyword in a connection string, as outlined in the ODBC specification. The complete path to the file data source can be specified in the syntax that is normal for the machine on which the file is located. For example, on Windows:
FILEDSN=C:\Program Files\Common Files\ODBC\DataSources\Hybridwp.dsn
or, on UNIX and Linux:
FILEDSN=/home/users/john/filedsn/Hybridwp2.dsn
If no path is specified for the file data source, the Driver Manager uses the DefaultDSNDir property, which is defined in the [ODBC File DSN] setting in the odbc.ini file to locate file data sources. If the [ODBC File DSN] setting is not defined, the Driver Manager uses the InstallDir setting in the [ODBC] section of the odbc.ini file. The Driver Manager does not support the SQLReadFileDSN and SQLWriteFileDSN functions.
As with any connection string, you can specify attributes to override the default values in the data source:
FILEDSN=/home/users/john/filedsn/Hybrid.dsn;UID=john;PWD=test01
A file data source for the Hybrid Data Pipeline driver would be similar to the following:
[ODBC]
Driver=DataDirect Hybrid Data Pipeline 4.1
LogonID=JOHN
HybridDataPipelineDataSource=SALES
LoginTimeout=15
It must contain all basic connection information plus any optional attributes. Because it uses the DRIVER keyword, an odbcinst.ini file containing the driver location must exist (see Configuring an ODBC data source on UNIX and Linux systems).