如何使用 iSeries ODBC 驱动程序创建文件 dsn 以连接到 AS400 系统?
iSeries ODBC 驱动程序允许配置许多设置。在哪里可以找到可以在文件 DSN 中设置的所有属性的列表?
关于各种风格的连接字符串,有一个很好的互联网资源:
http://www.connectionstrings.com/
这是 AS400 ODBC 驱动程序的页面:http: //www.connectionstrings.com/as-400
IBM 客户端访问 ODBC 驱动程序
Driver={Client Access ODBC Driver (32-bit)};System=my_system_name;
Uid=myUsername;Pwd=myPassword;
IBM iSeries Access ODBC 驱动程序
此驱动程序比上述驱动程序更新。
Driver={iSeries Access ODBC Driver};System=my_system_name;
Uid=myUsername;Pwd=myPassword;
使用 IBM.Data.DB2.iSeries 名称空间
DataSource=myServerAddress;UserID=myUsername;
Password=myPassword; DataCompression=True;
IBM 客户端访问 OLE DB 提供程序
Provider=IBMDA400;Data Source=MY_SYSTEM_NAME;
User Id=myUsername;Password=myPassword;
其中 MY_SYSTEM_NAME 是 OperationsNavigator 中系统连接的名称
IBM 客户端访问 OLE DB 提供程序
Provider=IBMDA400;Data Source=MY_SYSTEM_NAME;User Id=myUsername;
Password=myPassword;Default Collection=MY_LIBRARY;
其中 MY_SYSTEM_NAME 是系统连接的名称,MY_LIBRARY 是 iSeries Navigator 中的库名称。
Driver={iSeries Access ODBC Driver};System=server;Uid=user;Pwd=password;
其中 server 是要连接的系统(IP 地址或主机名)、用户名和密码。
你可以有一个这样的 .dsn 文件:
[ODBC]
DRIVER=iSeries Access ODBC Driver
System=server;
Uid=user;
Pwd=password;
Initial Catalog=library;
我刚刚发现您可以使用 ODCB 管理工具为任何类型的 ODBC 驱动程序创建文件 DSN。
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.