Home  /  Application Development: Language Bindings and Gateways  /  Using ODBC with InterSystems Products  /  Using InterSystems IRIS as an ODBC Data Source on Microsoft Windows

Using ODBC with InterSystems Products
Using InterSystems IRIS as an ODBC Data Source on Microsoft Windows
[Back]  [Next] 
InterSystems: The power behind what matters   

This chapter describes how to create a DSN for an InterSystems IRIS™ database on Windows, which you can do either via the Control Panel or by creating a file DSN.
Creating a DSN by Using the Control Panel
To create a DSN, you can use the InterSystems 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:
InterSystems ODBC Data Source Setup Dialog Box
Use this dialog box to specify the details for a specific InterSystems 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
InterSystems IRIS 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,
DSN=IRIS Sample Code
or specify the full set of connection parameters
DRIVER=InterSystems ODBC
If the user ID or password is not supplied as part of the connection parameters, the connection manager will prompt for them.
Commonly used file DSNs are usually stored in the following directory:
%SystemRoot%\Program Files\Common Files\ODBC\Data Sources