Informix Error -6070: Tried to close a database with a transaction open.
Cause and resolution
Tried to close a database with a transaction open.
Before the program closes the database with dbselect(), it must end the current transaction. The program can use a call to dbcommit() or dbrollback().
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-6070 fires when the program tries to close the database via dbselect() while a transaction is still open — per the archived catalogue, the transaction must be ended first.
- A dbselect() close attempted with an open transaction, per the archived catalogue — the direct, only cause.
Solutions / Resolution
- End the current transaction with dbcommit() or dbrollback() before closing the database, per the archived catalogue.
Examples
N/A
No specific triggering statement is documented beyond the function-level condition described above.
Diagnostic Checks
- Confirm no transaction is still open before the database-close call.
Related Errors / Related Topics
- -6064 — "Tried to terminate a transaction that hasn't been started."
- -6065 — "Database does not have transactions."
- -6069 — "Tried to lock a table outside a transaction."
End the transaction with dbcommit()/dbrollback() before closing the database.