SqlDead%

Indicates whether a SQL Server connection is inactive.

Syntax

SqlDead% ( sqlconn% )

where

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

Returns

SUCCEED (1) or FAIL (0).

Remarks

SqlDead% is particularly useful in user-supplied error handlers. If the SQL Server connection is dead, almost every DB-Library for Visual Basic procedure that receives that connection as a parameter immediately fails, calling the error handler. You must close an inactive sqlconn% connection with SqlClose% and open a new connection with SqlOpen%.

SqlDead% usually returns true when a network connection is broken. Note any other errors or messages that you receive.

See Also

Programming with DB-Library for Visual Basic; Error Messages