Using Caché with ODBC
Using Caché as an ODBC Data Source on Windows
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

This chapter describes how to perform a stand-alone ODBC installation under Windows, and how to create a DSN for a Caché database on Windows, which you can do either via the Control Panel or by creating a file DSN.

Performing a Stand-alone Installation
By default, Caché performs a full ODBC installation with a standard installation. If you perform a custom installation, you can select the “SQL client only” option to install only the client access components (ODBC client driver). For information, see the Caché Installation Guide.
In addition, however, Caché provides a simple stand-alone installer for Caché ODBC.
This installer is in the ODBC directory of the Caché DVD. This directory provides the following three files:
Run the installer that is appropriate for your platform and needs
Creating a DSN by Using the Control Panel
To create a DSN, you can use the Caché ODBC Data Source Setup dialog box. To access this dialog box, click the ODBC Data Sources icon, either in Windows Control Panel or its Administrative Tools subpanel. On the User DSN tab, click the Add... button, select Intersystems ODBC, and click the Finish button. The dialog box looks like the following example:
Caché ODBC Data Source Setup Dialog Box
Use this dialog box to specify the details for a specific Caché ODBC data source. The fields are listed below and are required unless otherwise specified:
After you have created the DSN, you can use the Test Connection button to see if your data source is working correctly.
On Windows 64-bit, use the Windows Control Panel ODBC Administrator to create user DSNs that function for both 32- and 64-bit programs. To configure a system DSN for a 32-bit program, run %SystemRoot%\SysWow64\odbcad32.exe.
Creating a File DSN
Caché also supports file DSNs. A file DSN is a normal file that contains information to establish a connection via ODBC. Additional information can be found on the Microsoft support site (search on "file DSN").
The connection specifies the file to use:
filedsn=<fully qualified path for the DSN>
A file DSN is invoked via SQLDriverConnect where you specify the file DSN. It can specify an existing DSN to use, for example,
[ODBC] 
DSN=CACHE Samples
or specify the full set of connection parameters
DRIVER=InterSystems ODBC
SERVER=127.0.0.1
PORT=1972
DATABASE=SAMPLES
AUTHENTICATION METHOD=0
QUERY TIMEOUT=1
UID=_system
PWD=SYS
If the user ID or password is not supplied as part of the connection parameters, the connection manager will prompt for them.
Note:
Commonly used file DSNs are usually stored in the following directory:
%SystemRoot%\Program Files\Common Files\ODBC\Data Sources