views:

67

answers:

1

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)

A: 

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?

Michał Niklas
Hi, Thanks for getting back, the CSK verion is "IBM Informix CSDK Version 3.50, IBM Informix-ESQL Version 3.50.UC7".
Frankied
I enabled tracing and got the following when I tried to connect through MONO:
Frankied
You can edit your question: add there trace and other useful information.
Michał Niklas
ppid=00003564,pid=00000000 ENTER SQLSetConnectAttrW SQLHDBC 0x08758F88 SQLINTEGER 115 SQLPOINTER 0x04D05CA0 SQLINTEGER 0 SQLINTEGER * 0x00000000ppid=00003564,pid=00000000 EXIT SQLSetConnectAttrW SQLHDBC 0x08758F88 SQLINTEGER 115 SQLPOINTER 0x04D05CA0 SQLINTEGER 0 SQLINTEGER * 0x00000000 with return code -1 (SQL_ERROR)
Frankied
ppid=00003564,pid=00000000 ENTER SQLConnectW SQLHDBC 0x08758F88 SQLWCHAR i SQLSMALLINT -3 SQLWCHAR * ***** SQLSMALLINT -3 SQLWCHAR * ***** SQLSMALLINT -3ppid=00003564,pid=00000000 EXIT SQLConnectW SQLHDBC 0x08758F88 SQLWCHAR i SQLSMALLINT -3 SQLWCHAR * ***** SQLSMALLINT -3 SQLWCHAR * ***** SQLSMALLINT -3 with return code -1 (SQL_ERROR)
Frankied
Sorry its not very readable on here. When I ran it outside of Mono the connection was very similar except the "EXIT SQLConnectW" gave "-3 with return code 0 (SQL_SUCCESS)"
Frankied