[unixODBC-support] unixODBC causing FreeTDS to crash or..?

Trælnes AS post at traelnes.no
Tue Nov 15 16:31:55 GMT 2005


Hello!

I am running asterisk using unixODBC and FreeTDS against MSSQL. I get an
error saying:

[ODBC][9136][SQLExecute.c][354]
                Exit:[SQL_ERROR]
                DIAG [24000] [FreeTDS][SQL Server]Invalid cursor state

I have asked the FreeTDS mailing list and they think this can be caused by
"2 active statement on same connection". This seems to be the case since
there are 2 statements executed according to the unixODBC log prior to the
error.

So since asterisk is using unixODBC and unixODBC is using FreeTDS I wonder
if the problem could be in unixODBC? I mean: asterisk is probably using 1
odbc connection (unixODBC) and trust unixODBC to handle multiple threads to
that connection. Or what do you think?

Here is a snippet of the log file with the 2 statements being executed
before the error:

[ODBC][10551][SQLPrepare.c][180]

                Entry:

                        Statement = 0x81328f0

                        SQL = [SELECT * FROM RealTimeSipBuddies WHERE name =
?][length = 47 (SQL_NTS)]

[ODBC][10551][SQLAllocHandle.c][872]

                Exit:[SQL_SUCCESS]

                        Output Handle = 0x820f6b0

[ODBC][10551][SQLPrepare.c][180]

                Entry:

                        Statement = 0x820f6b0

                        SQL = [SELECT * FROM RealTimeSipBuddies WHERE name =
?][length = 47 (SQL_NTS)]

[ODBC][10551][SQLPrepare.c][355]

                Exit:[SQL_SUCCESS]

[ODBC][10551][SQLBindParameter.c][193]

                Entry:

                        Statement = 0x81328f0

                        Param Number = 1

                        Param Type = 1

                        C Type = 1 SQL_C_CHAR

                        SQL Type = 1 SQL_CHAR

                        Col Def = 3

                        Scale = 0

                        Rgb Value = 0xb721b558

                        Value Max = 0

                        StrLen Or Ind = (nil)

[ODBC][10551][SQLPrepare.c][355]

                Exit:[SQL_SUCCESS]

[ODBC][10551][SQLBindParameter.c][193]

                Entry:

                        Statement = 0x820f6b0

                        Param Number = 1

                        Param Type = 1

                        C Type = 1 SQL_C_CHAR

                        SQL Type = 1 SQL_CHAR

                        Col Def = 3

                        Scale = 0

                        Rgb Value = 0xb67d5070

                        Value Max = 0

                        StrLen Or Ind = (nil)

[ODBC][10551][SQLBindParameter.c][339]

                Exit:[SQL_SUCCESS]

[ODBC][10551][SQLExecute.c][193]

                Entry:

                        Statement = 0x81328f0

[ODBC][10551][SQLBindParameter.c][339]

                Exit:[SQL_SUCCESS]

[ODBC][10551][SQLExecute.c][193]

                Entry:

                        Statement = 0x820f6b0

[ODBC][10551][SQLExecute.c][354]

                Exit:[SQL_SUCCESS]

[ODBC][10551][SQLNumResultCols.c][149]

                Entry:

                        Statement = 0x81328f0

                        Column Count = 0xb721a4fc

[ODBC][10551][SQLExecute.c][354]

                Exit:[SQL_ERROR]

                DIAG [24000] [FreeTDS][SQL Server]Invalid cursor state

 

[ODBC][10551][SQLNumResultCols.c][234]

                Exit:[SQL_SUCCESS]

                        Count = 0xb721a4fc -> 37





More information about the unixODBC-support mailing list