in reply to ODBC error message

No. It's pretty much your code. You have done a query (A) but not fully read the results. Hence the next query (B) cannot be done because: Connection is busy with results from another hstmt. The error message is pretty self-explantory.

-derby