ODBC Connection DSN File for iSeries AS400

How to create a dsn file to connect to an AS400 system using the iSeries ODBC driver?

The iSeries ODBC driver allows you to configure many settings. Where can I find a list of all the properties that can be set in a DSN file?

+3
source share
5 answers

Driver = {iSeries Access ODBC Driver}; System = server; Uid = user; Pwd = password;

Where server is the system to connect to (IP address or host name), username and password.

You may have a .dsn file like this:

[ODBC] DRIVER=iSeries Access ODBC Driver System=server; Uid=user; Pwd=password; Initial Catalog=library; 
+2
source

There is a good online resource dedicated to connecting strings of all tastes:

http://www.connectionstrings.com/

Here is the page for ODBC AS400 drivers: http://www.connectionstrings.com/as-400


ODBC

IBM Client Access ODBC Driver

 Driver={Client Access ODBC Driver (32-bit)};System=my_system_name; Uid=myUsername;Pwd=myPassword; 

ODBC driver for accessing IBM iSeries iSeries

This driver is newer than the one indicated above.

 Driver={iSeries Access ODBC Driver};System=my_system_name; Uid=myUsername;Pwd=myPassword; 

IBM.Net Data Provider

Using the IBM.Data.DB2.iSeries Namespace

 DataSource=myServerAddress;UserID=myUsername; Password=myPassword; DataCompression=True; 

OLE DB, OleDbConnection

IBM OLE DB Provider for Client Access

 Provider=IBMDA400;Data Source=MY_SYSTEM_NAME; User Id=myUsername;Password=myPassword; 

Where MY_SYSTEM_NAME is the name assigned to the system connection in OperationsNavigator

IBM OLE DB Provider for Client Access

 Provider=IBMDA400;Data Source=MY_SYSTEM_NAME;User Id=myUsername; Password=myPassword;Default Collection=MY_LIBRARY; 

Where MY_SYSTEM_NAME is the name assigned to the System Connection and MY_LIBRARY is the name specified by the library in iSeries Navigator.

+2
source

I just discovered that you can create a DSN file using the ODCB administration tool for any type of ODBC driver.

+1
source

Here is a detailed description of what each keyword is and how you can customize them. The discussion is for DSN-free connections in applications, but is useful if you want to configure your DSN file. I found it more useful than the IBM documentation.

http://www.sqlthing.com/HowardsODBCiSeriesFAQ.htm

+1
source

All Articles