CFQuery timing out
Does anyone know how to force a new database connection each time you execute cfquery?
I'm connected to an Oracle db, and they have configured a timeout on all db connections to 15 min.
My CF script does the following:
1. Queries db (takes 1 min)
2. (Away from the db), transforms data and writes it to a file. (This takes 30 min)
3. Queries db
I receive error: Error Executing Database Query.
[Macromedia][Oracle JDBC Driver][Oracle]ORA-02396: exceeded maximum idle time, please connect again
In CF Administrator, my Data Source has:
- Limit Connections: unchecked
- Maintained Connections: unchecked
- Max Pooled Statements: 0
- Timeout (min): 4
- Interval (min): 4
- Query Timeout (sec): 0
- Oracle Linked Servers: unchecked
I thought by unchecking Maintained Connections, it should force a new connection on each cfquery.
But, it doesn't, and I still get the error.
I am hoping that I don't have to put a try/catch block around every cfquery in all of my scripts
and loop back around to attempt the cfquery again. That will produce some messy code.
So, is there a way to force cfquery to use a new connection each time?
Or is there a way to connect to the db first (outside of cfquery), and pass the connection handle to cfquery?
Thanks.
myscreenname0345
