in reply to Re^3: Can not figure out cause of error.
in thread Can not figure out cause of error.

The error does go away when I add $sth -> finish; so at this point I am just trying to figure out why this error appears in one script and not the other when the same code is used.
  • Comment on Re^4: Can not figure out cause of error.

Replies are listed 'Best First'.
Re^5: Can not figure out cause of error.
by jZed (Prior) on Aug 13, 2005 at 20:16 UTC
    I couldn't guess what's going on without seeing all the scripts, but one possibility is that in some scripts the $sth goes out of scope before the call to $dbh->disconnect. Another possibility is that the data is in a different state when you perform the queries. BTW, I believe what you are seeing is a warning, not an error. I surmise this because you aren't using RaiseError. I'd recommend using RaiseError on general principles. If you really want to track down exactly why you get the warning, you might google for the text of the warning and the name of your DBMS, e.g. -- ODBC "disconnect invalidates"
      Thanks, I would show you the scripts but the method of my coding would make your eyes hurt when reading it (I use no sort of formating). I will do some double checking of the scripts and some googling to see what I can come up with. And you are right, this is not really an error but something that only comes up with the -w switch.