다음을 통해 공유


VerifyConnection Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The VerifyConnection method tests the connection used by the SQLServer object.

구문

object
.VerifyConnection( [ ReconnectIfDead ] )asBoolean

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • ReconnectIfDead
    Long integer that controls method behavior as described in Settings.

Prototype (C/C++)

HRESULT VerifyConnection(
LPBOOL pRetVal,
SQLDMO_VERIFYCONN_TYPE VerifyType = SQLDMOConn_ReconnectIfDead);

Settings

Constant

Value

Description

SQLDMOConn_CurrentState

2

Return TRUE if connected.

SQLDMOConn_LastState

1

Return TRUE if connected on last call and still connected, or not connected on last call and still not connected.

SQLDMOConn_/ReconnectIfDead

6

Default. Attempt to reconnect the SQLServer object if the object has been connected and has lost its connection. Return TRUE if connection exists.

Returns

TRUE or FALSE as described in Settings.

Applies To: