The Auto Free feature
If you enable the HCL OneDB™ Auto Free feature, the database server automatically frees the cursor when it closes the cursor. Therefore, your application does not have to send two separate requests to close and then free the cursor—closing the cursor is sufficient.
You can enable the Auto Free feature by setting the IFX_AUTOFREE property to
TRUE
in the database URL, as in this
example:jdbc:onedb://123.45.67.89:1533;user=rdtest;password=test;ifx_autofree=true;
You can also use one of the following methods:
public void setAutoFree (boolean flag) public boolean getAutoFree()
The setAutoFree() method should be called before the executeQuery() method, but the getAutoFree() method can be called before or after the executeQuery() method.
To use these methods, your applications must import classes
from the HCL
OneDB package com.informix.jdbc and
cast the Statement class to the IfmxStatement class,
as shown here:
import com.informix.jdbc.*; ... (IfmxStatement)stmt.setAutoFree(true);
The Auto Free feature is available for the following database
server versions:
- Version 7.23 and later
- Version 9.0 and later