XP is just a number | |
PerlMonks |
Re^2: MS SQL problemby disciple (Pilgrim) |
on Dec 10, 2004 at 17:10 UTC ( [id://413914]=note: print w/replies, xml ) | Need Help?? |
dragonchild is correct. Funny thing is I was just reading about this last night in my "Programming the Perl DBI" book. It says if a statement handle is opened and has not been "finished" you will get the following warning when trying to reuse the statement handle: "disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting)". If you are fetching from a statement handle and you fetch the last row, the finish method is called for you. On the other hand if you do not fetch all the rows and try to reuse the statement handle you get the following warning: "disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting)". What I didn't read in the book is this. If you attempt to reuse the database handle when a statement handle is open and not finished you get the error: "st execute failed: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt". This may only be the case with MS SQL, but I am not sure. When I executed equivalent code you posted with warnings turned on, I got both the error you posted and the warning I posted. Update: Put code tags around error message to fix output.
In Section
Seekers of Perl Wisdom
|
|