3

How can I create a file dsn for connecting to an AS400 system using the iSeries ODBC driver?

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

5 Answers5

2

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

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

You can have a .dsn file like this:

[ODBC]
DRIVER=iSeries Access ODBC Driver
System=server;
Uid=user;
Pwd=password;
Initial Catalog=library;
Gustavo Rubio
  • 10,209
  • 8
  • 39
  • 57
2

There is a good internet resource regarding connectionstrings of all flavors:

http://www.connectionstrings.com/

Here is the page for the AS400 ODBC 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;

IBM iSeries Access ODBC driver

This driver is newer than the one 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 Client Access OLE DB provider

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

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

IBM Client Access OLE DB provider

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

Where MY_SYSTEM_NAME is the name given to the System Connection, and MY_LIBRARY is the name given to the library in iSeries Navigator.

splattne
  • 102,760
  • 52
  • 202
  • 249
1

Here is the IBM documentation on ODBC connection string parameters.

Blorgbeard
  • 101,031
  • 48
  • 228
  • 272
1

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

1

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

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