I have client utility that uses OLEDB to call a DB2 stored procedure. Inside the stored a procedure a cursor is opened so my utility can read record sets. Everything works fine but after a while of calling the same procedure over and over again, DB2 eventually throws an error that is related to the cursor being left open. Is there a sql command in DB2 to close the last used cursor or something similar?
A:
I can't see how to do it from the client, but in the sp the code should be calling
Close CursorName;
. Can you not update the procedure?
Preet Sangha
2010-09-28 20:28:50