Using ODBC with InterSystems IRIS
Using InterSystems IRIS as an ODBC Data Source on Microsoft Windows
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
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:
Specifies the name of the DSN.
Specifies an optional description of the DSN.
Host Port Number
Specifies the port for connecting to the DSN. The default for InterSystems IRIS is 51773.
If you select Kerberos
, also specify the following additional settings:
Optionally specifies the username for logging into the DSN. By default, this is _SYSTEM
and is not
Optionally specifies the password for the account specified by the UID
entry. For the SYSTEM username, the password is SYS
If selected, specifies the creation of a log file of ODBC client driver activities for all InterSystems IRIS DSNs. This log is for troubleshooting; you should not turn logging on during normal operation as it will dramatically slow down ODBC performance. See the chapter on Logging
for more information.
If selected, enables the InterSystems ODBC client driver’s static cursor support. If this flag is off, then the cursor support provided by the ODBC Cursor Library will be used. In general, this flag should be off unless you have a specific reason for not using the ODBC Cursor Library.
Disable Query Timeout
If selected, causes the ODBC client driver to ignore the value of the ODBC query timeout setting.
The ODBC query timeout setting specifies how long a client should wait for a specific operation to finish. If an operation does not finish within the specified time, it is automatically cancelled. The ODBC API provides functions to set this timeout value programmatically. Some ODBC applications, however, hard-code this value. If you are using an ODBC application that does not allow you to set the timeout value and the timeout value is too small, you can use the Disable Query Timeout option to disable timeouts.
Use Locale Decimal Symbol
When selected, specifies the use of the current locale's decimal separator; not checking this sets the decimal separator in the process to a period ("."
) regardless of the locale. This value can have an affect when the ODBC connection is interoperating with an application that uses the decimal separator as defined for the current locale.
Unicode SQL Types
If selected, turns on reporting of a Unicode SQL type (SQL_WVARCHAR (-9) SQLType
) for string data. This allows Microsoft Office 2000 and Visual Basic applications to allocate the properly sized buffers to hold multibyte data. This functionality is only relevant if you are working with a multibyte character set, such as in Chinese, Hebrew, Japanese, or Korean locales. If you are only using single-byte character set data, do not select this check box.
After you have created the DSN, you can use the
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
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
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