SqlClose

Closes and frees a single SQL Server connection.

Syntax

SqlClose ( sqlconn% )

where

sqlconn% ( )
Is a SQL Server connection. The value of sqlconn% is returned by SqlOpen%.

Returns

SUCCEED(1) or FAIL(0).

Remarks

SqlClose stops any activity associated with a SQL Server connection, closes the connection, and frees allocated memory. Closing a sqlconn connection with SqlClose automatically closes all the cursors associated with it.

To open a SQL Server connection, use SqlOpen%. To close all open SQL Server connections, use SqlExit.

Calling SqlClose with a sqlconn% or sqlconn& value not returned by SqlOpen% causes an error.

See Also

SqlExit, SqlOpen%