次の方法で共有


ConnectionBroken Event

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The ConnectionBroken event occurs when a connected SQLServer object loses its connection to an instance of Microsoft SQL Server.

構文

Private Function
object
_ConnectionBroken(
Message as String
)
as
Boolean

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • Message
    String that contains descriptive message text.

Prototype (C/C++)

HRESULT ConnectionBroken(SQLDMO_LPCSTR Message,
LPBOOL Retry);

解説

SQL Distributed Management Objects (SQL-DMO) raises the ConnectionBroken event only when the AutoReConnect property of the SQLServer object is False. When AutoReConnect is True, SQL-DMO will not raise the event, even when automatic reconnection fails.

When a ConnectionBroken event handler returns True, SQL-DMO attempts to reconnect to an instance of SQL Server indicated when the Connect method of the SQLServer object connected successfully. When a ConnectionBroken event handler does not return a value, or returns False, SQL-DMO does not attempt to reconnect the SQLServer object upon return from the event handler.

Applies To:

SQLServer Object

参照

関連項目

AutoReConnect Property

ヘルプおよび情報

SQL Server 2005 の参考資料の入手