The "ADO event model" supports some synchronous or asynchronous ADO operations before or after
Events can be triggered. "Event" is actually a call to the event handler routine.
The event handler called before the operation starts is used to check or modify operation parameters. You can delete or
Complete. Because ADO 2.0 supports asynchronous operations, the event handler called after the operation is complete
Not important. For example, start asynchronous
When the Recordset. Open operation is completed, the application receives a notification by executing the completed event.
There are two types of events:
ConnectionEvents-when the connected transaction starts, commits, or rolls back, when the Command is executed, and the Connection
Events triggered at the start or end.
RecordsetEvents-when the Recordset object row is located, change the fields in the Recordset row and change the Recordset
Or events that occur when the record set is changed.
ADO Event Summary
ADO 2.0 supports events, which are notifications about certain operations that will or have occurred.
There are two types of events: ConnectionEvent and RecordsetEvent. Connection object generation
ConnectionEvent event, while The Recordset object generates the RecordsetEvent event.
An event is handled by an event handler routine that is called before or after an operation starts.
Some events occur in pairs. The event name format called before the operation starts is WillEvent (Will event)
The event name format called after the operation is EventComplete (Complete event ).
Other non-paired events only occur after the operation is completed. (The name does not have any fixed mode .)
Event handlers are controlled by status parameters. Additional information is provided by errors and object parameters.
You can request the event handler to reject any notifications after the first notification. For example, you can select to only receive
Will event or Complete event.
In a programming language, events from multiple ADO objects can be handled by one event handler. One
Events can also be processed by multiple event handlers, but they are not very common.
ADO event
ADO 2.0 supports events. Events are notifications sent before or after operations. Event reality
Is the call to the event handler routine defined in the application. See ADO event instances in different languages.
Events are divided into two types. The ConnectionEvent class operates from a Connection object, while the RecordsetEvent
Class is from the operation that belongs to the Recordset object.
ConnectionEvents-start and submit a connection transaction
Or when the Command is executed, the connection starts or ends, the event is triggered.
RecordsetEvents-locate, change, and change fields in the Recordset object row
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.