Skip to Content.
Sympa Menu

freetds - RE: [freetds] Invalid cursor state error

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: freddyz77 AT tin.it
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Invalid cursor state error
  • Date: Thu, 4 Mar 2004 16:48:43 +0100


>
>> From: Casey Allen Shobe [mailto:cshobe AT osss.net]
>> Sent: March 3, 2004 11:02 AM
>> Casey Allen Shobe wrote:
>> > DBD::ODBC::st execute failed: [unixODBC][FreeTDS][SQL
>> Server]Invalid
>> > cursor state (SQL-24000)(DBD: st_execute/SQLRowCount err=-1) at
>> > /usr/bin/dbtransfer.pl line 336.
>>
>> Seems this problem has been seen before. Here's something I found on

>> the web which points at a bug in FreeTDS:
>> http://www.egenix.com/mailman-archives/egenix-users/2004-Janua
>ry/000338.html
>
>Indeed, it seems Fabricio sent a message to this list the same day (12
January),
>and received no response. It's too bad we overlooked it then.
>
>> Any chance a patch already exists to fix this behavior? Or perhaps a

>> version 0.62.2 to be released in a few days?
>
>You have my patch from my previous message. I don't intend to issue a
point
>release until someone more familiar with the ODBC driver has had a chance
>to review it. Normally, that would be Frediano, and normally he'd already
>have looked at it, but he hasn't posted a message since Friday, and I'm
prepared
>to wait a week or so for him to get back to us.
>

I'm attempting a course...

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).

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page