Click or drag to resize

Functions.SqlIdleDisconnect Method

-- todo --
Allows a SQL pass-through connection or connections to be temporarily disconnected.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.18
 FUNCTION SqlIdleDisconnect(
	nStatementHandle AS LONG
Request Example View Source


Type: Long
Specifies the statement handle of the connection to be temporarily disconnected. Specify 0 for nStatementHandle to temporarily disconnect all active connections.

Return Value

Type: Long
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.
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).
See Also