| C1.Data.Express.2 Assembly > C1.Data.Express Namespace > C1ExpressConnection Class : BeforeUpdate Event |
'Declaration Public Event BeforeUpdate As DataSetEventHandler
public event DataSetEventHandler BeforeUpdate
The event handler receives an argument of type DataSetEventArgs containing data related to this event. The following DataSetEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| DataSet | The data set where the event has occurred. |
| Error | For an unsuccessful operation, information detailing the error. |
| Status | Success or failure status of the operation. In events occurring before operation and allowing to change the status argument, user code can change the status to indicate whether to proceed with the operation, skip or abort it. |
| Tables | Returns the table collection of the data set. Use this property to gain access to table data in 3-tier configuration, where the DataSet argument is not set because it resides on the client and the event is fired on the server. |
| TableViews | Returns the table view collection of the data set. Use this property to gain access to table view data in 3-tier configuration, where the DataSet argument is not set because it resides on the client and the event is fired on the server. |
You can even perform the whole update process in your code in the BeforeUpdate event and tell C1DataObjects to skip further processing, consider it done, by setting the Status argument to Skip. If you detect an unrecoverable error in this event, set the Status argument to ErrorsOccurred and set the Error argument to describe the error.