The Auto Free feature
If you enable the HCL Informix® 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 variable to TRUE in
the database URL, as in this example:
jdbc:informix-sqli://123.45.67.89:1533:INFORMIXSERVER=myserver;
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 Informix 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