简体   繁体   English

无DSN的ODBC连接到iSeries

[英]DSN-less ODBC Connection to iSeries

I'm running PHP 5.2.4 with ibm_db2 v1.8.0 on Ubuntu 8.04.1 Server. 我在Ubuntu 8.04.1 Server上使用ibm_db2 v1.8.0运行PHP 5.2.4。 I am trying to hit an IBM iSeries running OS/400 v5R3 but I'm not sure at all how to actually connect without a DSN. 我正在尝试运行一个运行OS / 400 v5R3的IBM iSeries,但是我不确定如何在没有DSN的情况下进行实际连接。 I've looked at http://www.connectionstrings.com/ but none of the DB2 or AS/400 connection strings seem to work. 我看过http://www.connectionstrings.com/,但是似乎没有DB2或AS / 400连接字符串。 All I end up with is: 我最终得到的是:

[IBM][CLI Driver] SQL1013N The database alias name or database name "" could not be found. SQLSTATE=42705 SQLCODE=-1013

Here is my current DSN string: 这是我当前的DSN字符串:

DRIVER={iSeries Access ODBC Driver};SYSTEM=192.168.0.20;Uid=user;Pwd=password

I've also tried the 'IBM DB2 ODBC DRIVER' but get the same error as the string above. 我也尝试过“ IBM DB2 ODBC DRIVER”,但得到与上面的字符串相同的错误。

事实证明,我不得不使用ODBC,因为没有一种简单的方法可以从PHP访问DBU,而无需设置DB2-C并通过管道传输所有内容。

Here is what I use within the .NET environment: 这是我在.NET环境中使用的:

Provider=IBMDA400.DataSource.1;Data Source=xxx.xxx.xxx.xxx;Password=xxxxxxxxxx;User ID=xxxxxxxxxx;Initial Catalog=SERVERNAME

You might be missing the "Initial Catalog". 您可能缺少“初始目录”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM