Data.Win.ADODB.TADOConnection.OnDisconnect

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: event
Visibility: published
Source:
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Unit: Data.Win.ADODB
Parent: TADOConnection

Delphi

property OnDisconnect: TDisconnectEvent read FOnDisconnect write FOnDisconnect;

C++

__property TDisconnectEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};

Description

Occurs after a connection is terminated.

Write an OnDisconnect event handler to take specific action after a connection to a database is terminated. The OnDisconnect event fires after the corresponding operation (ending a connection) has executed at the ADO Connection object. Calling the Close method or setting the Connected property to false will lead to this event occurring.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

See Also