连接到安装了 mono 的 Informix DB 时出现 ODBC 错误

发布于 2024-09-19 13:17:27 字数 4573 浏览 5 评论 0原文

我最近在 Fedora Linux 系统上安装了 Mono,以便我们能够在其上运行 ASP.NET 应用程序。我能够启动并运行这一部分,但问题是我们使用 Informix DB,而 Mono 似乎阻止了 ODBC 工作。

有没有人有过使用 ODBC 连接到安装了 Mono 的 Informix DB 的经验?

我们有:

  • IBM Informix-ESQL 版本 3.50.UC7
  • unixODBC 2.2.14
  • Informix SE 版本 7.25.UC6R1
  • Mono 版本 2.6.7。
  • CSDK 版本是“IBM Informix CSDK Version 3.50、IBM Informix-ESQL Version 3.50.UC7”

任何帮助将不胜感激。

这是完整的跟踪:


ppid=00003564,pid=00000000         ENTER SQLSetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0x00000003
        SQLINTEGER    0

ppid=00003564,pid=00000000         EXIT SQLSetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0x00000003
        SQLINTEGER    0 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLGetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0xBFBF84F0
        SQLINTEGER    0
        SQLINTEGER *  0x04D05CA0

ppid=00003564,pid=00000000         EXIT SQLGetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0xBFBF84F0
        SQLINTEGER    0
        SQLINTEGER *  0x04D05CA0 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLAllocHandle
        SQLSMALLINT            2
        SQLHANDLE       0x087489c8
        SQLHANDLE *     0x0874c4c8

ppid=00003564,pid=00000000         EXIT SQLAllocHandle
        SQLSMALLINT            2
        SQLHANDLE       0x087489c8
        SQLHANDLE *     0x0874c4c8 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLSetConnectAttrW
        SQLHDBC       0x08758F88
        SQLINTEGER    115
        SQLPOINTER    0x04D05CA0
        SQLINTEGER    0
        SQLINTEGER *  0x00000000

ppid=00003564,pid=00000000         EXIT SQLSetConnectAttrW
        SQLHDBC       0x08758F88
        SQLINTEGER    115
        SQLPOINTER    0x04D05CA0
        SQLINTEGER    0
        SQLINTEGER *  0x00000000 with return code -1 (SQL_ERROR)

ppid=00003564,pid=00000000         ENTER SQLConnectW
        SQLHDBC         0x08758F88
        SQLWCHAR        i
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3
ppid=00003564,pid=00000000         EXIT SQLConnectW
        SQLHDBC         0x08758F88
        SQLWCHAR        i
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3 with return code -1 (SQL_ERROR)

ppid=00003564,pid=00000000         ENTER SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     1
        SQLWCHAR *       ^R
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       ~B
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA

ppid=00003564,pid=00000000         EXIT SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     1
        SQLWCHAR *       I
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       [
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     2
        SQLWCHAR *       I
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       [
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA

ppid=00003564,pid=00000000         EXIT SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     2
        SQLWCHAR *       I
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       [
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA with return code 100 (SQL_NO_DATA_FOUND)

ppid=00003564,pid=00000000         ENTER SQLFreeHandle
        SQLSMALLINT            2
        SQLHANDLE       0x08758f88

ppid=00003564,pid=00000000         EXIT SQLFreeHandle
        SQLSMALLINT            2
        SQLHANDLE       0x00000000 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLFreeHandle
        SQLSMALLINT            1
        SQLHANDLE       0x087489c8

ppid=00003564,pid=00000000         EXIT SQLFreeHandle
        SQLSMALLINT            1
        SQLHANDLE       0x00000000 with return code 0 (SQL_SUCCESS)

当我在 Mono 之外运行它时,连接非常相似,除了 EXIT SQLConnectW 给出 -3 并返回代码 0 (SQL_SUCCESS)

I have recently installed Mono on our Fedora Linux system so that we are able to run ASP.NET applications on it. I was able to get this part up and running, but the problem is we use a Informix DB and Mono seems to stop the ODBC from working.

Have anyone any experience of getting an ODBC to connect to an Informix DB with Mono installed?

We have:

  • IBM Informix-ESQL Version 3.50.UC7
  • unixODBC 2.2.14
  • Informix SE version 7.25.UC6R1
  • Mono version 2.6.7.
  • CSDK version is "IBM Informix CSDK Version 3.50, IBM Informix-ESQL Version 3.50.UC7"

Any help would be greatly appreciated.

here is the full trace:


ppid=00003564,pid=00000000         ENTER SQLSetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0x00000003
        SQLINTEGER    0

ppid=00003564,pid=00000000         EXIT SQLSetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0x00000003
        SQLINTEGER    0 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLGetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0xBFBF84F0
        SQLINTEGER    0
        SQLINTEGER *  0x04D05CA0

ppid=00003564,pid=00000000         EXIT SQLGetEnvAttr
        SQLHENV       0x087489C8
        SQLINTEGER    200
        SQLPOINTER    0xBFBF84F0
        SQLINTEGER    0
        SQLINTEGER *  0x04D05CA0 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLAllocHandle
        SQLSMALLINT            2
        SQLHANDLE       0x087489c8
        SQLHANDLE *     0x0874c4c8

ppid=00003564,pid=00000000         EXIT SQLAllocHandle
        SQLSMALLINT            2
        SQLHANDLE       0x087489c8
        SQLHANDLE *     0x0874c4c8 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLSetConnectAttrW
        SQLHDBC       0x08758F88
        SQLINTEGER    115
        SQLPOINTER    0x04D05CA0
        SQLINTEGER    0
        SQLINTEGER *  0x00000000

ppid=00003564,pid=00000000         EXIT SQLSetConnectAttrW
        SQLHDBC       0x08758F88
        SQLINTEGER    115
        SQLPOINTER    0x04D05CA0
        SQLINTEGER    0
        SQLINTEGER *  0x00000000 with return code -1 (SQL_ERROR)

ppid=00003564,pid=00000000         ENTER SQLConnectW
        SQLHDBC         0x08758F88
        SQLWCHAR        i
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3
ppid=00003564,pid=00000000         EXIT SQLConnectW
        SQLHDBC         0x08758F88
        SQLWCHAR        i
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3
        SQLWCHAR *       *****
        SQLSMALLINT     -3 with return code -1 (SQL_ERROR)

ppid=00003564,pid=00000000         ENTER SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     1
        SQLWCHAR *       ^R
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       ~B
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA

ppid=00003564,pid=00000000         EXIT SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     1
        SQLWCHAR *       I
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       [
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     2
        SQLWCHAR *       I
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       [
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA

ppid=00003564,pid=00000000         EXIT SQLGetDiagRecW
        ,SQLSMALLINT     2
        SQLHANDLE       0x08758F88
        SQLSMALLINT     2
        SQLWCHAR *       I
        SQLINTEGER *    0xBFBF96E0
        SQLWCHAR *       [
        SQLSMALLINT     1026
        SQLSMALLINT *   0xBFBF96EA with return code 100 (SQL_NO_DATA_FOUND)

ppid=00003564,pid=00000000         ENTER SQLFreeHandle
        SQLSMALLINT            2
        SQLHANDLE       0x08758f88

ppid=00003564,pid=00000000         EXIT SQLFreeHandle
        SQLSMALLINT            2
        SQLHANDLE       0x00000000 with return code 0 (SQL_SUCCESS)

ppid=00003564,pid=00000000         ENTER SQLFreeHandle
        SQLSMALLINT            1
        SQLHANDLE       0x087489c8

ppid=00003564,pid=00000000         EXIT SQLFreeHandle
        SQLSMALLINT            1
        SQLHANDLE       0x00000000 with return code 0 (SQL_SUCCESS)

When I ran it outside of Mono the connection was very similar except the EXIT SQLConnectW gave -3 with return code 0 (SQL_SUCCESS)

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

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

发布评论

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

评论(1

你是年少的欢喜 2024-09-26 13:17:27

虽然您仅遇到 Mono 问题,但您可以尝试跟踪它。启用 ODBC 跟踪(一旦我在 Linux 上遇到问题,但 Informix 文档中有错误,请参阅:跟踪 Informix Client for Linux 的 ODBC 调用)。

从 isql 跟踪 Informix 客户端并保存跟踪文件,然后从 Mono 跟踪它并比较两个跟踪。在 Mono 跟踪中应该有更多关于发生的事情的信息。

Jonathan 要求您检查是否使用最新的 CSDK 库,并向我们展示您的驱动程序版本。也许您使用的是乔纳森所说的带有 Unicode bug 的旧驱动程序,您应该升级驱动程序吗?

While you have problem only with Mono you can try to trace it. Enable ODBC tracing (once I had problems with it on Linux, but there was error in Informix docs, see: Tracing ODBC calls for Informix Client for Linux).

Trace Informix client from isql and save trace file, then trace it from Mono and compare both traces. In Mono trace should be more information on what happened.

Jonathan asked you to check if you use the newest CSDK library, show us your version of drivers. Maybe you use old drivers with Unicode bug Jonathan was talking about and you should upgrade drivers?

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