[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] Invalid Cursor State By SELECT after INSERT
From:       "John Mazza" <john.mazza () mgcworks ! com>
Date:       2008-07-24 2:06:51
Message-ID: 20080724020658.241964C022 () lists ! ibiblio ! org
[Download RAW message or body]

>
>this is the problem! here you call SQLExecute but you forgot to read row
>returned by select! So state is 2 (PENDING) which means that is expected
>you read data. This is probably an INSERT after a SELECT, not a SELECT
>after INSERT. Get the row after select and problem will disappear. Or
>you can use cursors settings.
>
>> ... omissis ...
>
>freddy77
>

Bingo!

Freddy has hit the nail on the head.  It turns out that the library
used to access ODBC had an issue with the access pattern used. 
Somehow, the actual queries were sent out of sequence either to the
ODBC layer or were mis-sequenced by the ODBC layer to FreeTDS.

For the time being I found a workaround in my app that makes it work
properly. Next week I will dig into the flow of the calls to figure out
exactly why things happened the way they do.  Maybe (with any luck) I
will figure out how to make the intermediate layers to "play nice" with
the driver.

Thanks to all here for the assistance!



_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic