| Message: 102770 |
 |
BY: Praveen Devarao (praveend) DATE: 2012-11-15 04:27 SUBJECT: RE: When to free statements from execute Hi Lucas,
Check the fetch_data method of IBM_DB Adapter. You will need to free the statement after all the data is been retrieved.
I am not sure what you meant when you say..."but doing it at the end of those methods doesn't always guarantee release" The statement does get released when called at the end of these methods.
>> Is it possible to release the statement from the server and still retain the data retrieved in a different way? <<
Statement handle is created on the client and not on the server. Cursor is the counterpart that is created on the server [in cases where there is a resultset associated]. When you retrieve the last row from the result set the cursor is automatically closed on the server [unless you have a scrollable or updateable cursor]. But however if you are still amidst the resultset and dont want to retrieve further, then a explicit call to free_stmt will release it.
Thanks
Praveen | |