与 iSeries 的无 DSN ODBC 连接

发布于 2024-07-12 09:23:45 字数 608 浏览 7 评论 0原文

我在 Ubuntu 8.04.1 服务器上运行 PHP 5.2.4 和 ibm_db2 v1.8.0。 我正在尝试连接运行 OS/400 v5R3 的 IBM iSeries,但我完全不确定如何在没有 DSN 的情况下进行实际连接。 我看过 http://www.connectionstrings.com/ 但没有 DB2 或 AS/ 400 个连接字符串似乎可以工作。 我最终得到的是:

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

这是我当前的 DSN 字符串:

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

我也尝试过“IBM DB2 ODBC DRIVER”,但得到与上面的字符串相同的错误。

I'm running PHP 5.2.4 with ibm_db2 v1.8.0 on Ubuntu 8.04.1 Server. 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. I've looked at http://www.connectionstrings.com/ but none of the DB2 or AS/400 connection strings seem to work. 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:

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鹤舞 2024-07-19 09:23:45

以下是我在 .NET 环境中使用的内容:

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

您可能会缺少“初始目录”。

Here is what I use within the .NET environment:

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".

悲喜皆因你 2024-07-19 09:23:45

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

As it turns out, I had to use ODBC as there wasn't an easy way to access DBU from PHP without having to set up DB2-C and pipe everything through there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文