Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: ODBC Error - Invalid Cursor State (SQL-24000)

by Anonymous Monk
on Sep 03, 2010 at 22:12 UTC ( [id://858812]=note: print w/replies, xml ) Need Help??


in reply to Re: ODBC Error - Invalid Cursor State (SQL-24000)
in thread ODBC Error - Invalid Cursor State (SQL-24000)

I ran into the same Invalid Cursor State (SQL-24000) error while using freetds. The only way I could get my program to run error-free was to connect and disconnect from the database for every iteration through a while loop. Ugly, bad form, abhorrent, yes, but it works.

It seems that this points to an incorrect reset of the cursor when a statement handle is finished running, though I've no clue how to fix it...

  • Comment on Re^2: ODBC Error - Invalid Cursor State (SQL-24000)

Replies are listed 'Best First'.
Re^3: ODBC Error - Invalid Cursor State (SQL-24000)
by Anonymous Monk on Mar 18, 2011 at 19:32 UTC
    I also saw this using FreeTDS. It was while reading through a result set in a while loop. My stored proc returned two sets of data (2 SELECTs). When I fit all of the data into a single SELECT that particular error went away.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://858812]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-23 21:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found