Re: Invalid Cursor State By SELECT after INSERT
"John Mazza" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
> >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!