[freetds] Invalid cursor state error
Lowden, James K
LowdenJK at bernstein.com
Fri Mar 5 15:13:02 EST 2004
> From: freddyz77 at tin.it [mailto:freddyz77 at tin.it]
> Sent: March 4, 2004 10:49 AM
> Problem is multiple statement. Assume you
> - create 2 statement
> - issue an update on first statement
> - issue a select on second statement
> - you want to read rows changed in first statement.
> The solution is to cache rows number on first statement
> (cause rows number
> on TDSSOCKET get overwritten by second statement).
> You patch is a workaround and work for single statements.
> !hstmt test is
> useless (statement value is already tested in macro).
I'm not absolutely sure we're working on the same problem, but maybe we are. All I know is I get (untrue) errors invoking stored procedures with 0.62.1, and that with my patch applied I don't see errors that I should see.
To me, it has nothing to do with "rows affected", which, although interesting, is not critical. What's critical is to be able to call stored procedures and be made aware of any errors transmitted by the server.
I'm ready, willing, and able to work on this. I'd be happy to solve it at the expense of correct row counts for now. I'd like to fix the release, if at all possible. But I'm not really sure how to attack the problem in a way that's consistent with what you have in mind.
I suspect that the error reporting problem is deeper than I first thought. I don't see how my patch can prevent error messages from being reported by SQLExecDirect(). I think they just aren't reported.
Have you looked into this and do you have any thoughts on the matter?
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please "reply" to the sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.
More information about the FreeTDS