Allows a SQL pass-through connection or connections to be temporarily disconnected.
SQLIDLEDISCONNECT(nStatementHandle) |
Parameters
- nStatementHandle
- Specifies the statement handle of the connection to be temporarily disconnected. Specify 0 for nStatementHandle to temporarily disconnect all active connections.
Return Value
Numeric.
1 is returned if SQLIDLEDISCONNECT(В ) successfully temporarily disconnects the SQL pass-through connection or connections.
-1 is returned if SQLIDLEDISCONNECT(В ) was unable to temporarily disconnect the SQL pass-through connection or connections.
Remarks
The function fails (returns -1) if the statement handle is busy or a connection is in manual commit mode. The AERROR( ) Function can be used to obtain information about the cause of the error.
A temporarily disconnected connection is automatically restored as soon as it is needed to perform an operation; the original connection string is used. The ODBC ODBChstmt property returns 0 if the statement handle is temporarily released and the ODBChdbc property returns 0 if the connection is temporarily disconnected. A shared connection is temporarily disconnected as soon as all its statement handles are temporarily disconnected (released).