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

I have had similar problems with freetds / iodbc / DBD::ODBC / MSSQL. Not sure where the problem is (I think it's MSSQL ) but you can't have two statement handles executing at the same time. You will need to cache your results from $sth1 then finish it, then loop through those results executing $sth2.
  • Comment on Re: ODBC Error - Invalid Cursor State (SQL-24000)