Informix Error -1807: No connection to disconnect.
Cause and resolution
No connection to disconnect.
You are attempting to disconnect a connection that does not exist at this time. Check your program to see that you have not already performed a DISCONNECT statement for this connection.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1807 fires when DISCONNECT targets a connection that doesn't currently exist — per the
official guidance, this is often because the program already executed DISCONNECT for that
connection.
DISCONNECTissued twice for the same connection, per the official guidance's specific named suspect — the direct, common cause.DISCONNECTissued for a connection that was never established, more generally.
Solutions / Resolution
- Verify that your program hasn't already executed a
DISCONNECTstatement for the connection in question, per the official guidance.
Examples
Disconnecting twice
DISCONNECT conn1;
DISCONNECT conn1;
-- -1807: conn1 was already disconnected by the first statement
Diagnostic Checks
- Trace the program's
DISCONNECTcalls for the connection in question, checking for a duplicate.
Related Errors / Related Topics
- -1803 — "Connection does not exist." A related connection error, about
SET CONNECTION/DISCONNECTreferencing a name that was never established at all, rather than one already disconnected.
DISCONNECT targeted a connection that doesn't currently exist, often from being called twice —
check the program's disconnect calls.