C1.Data.2 Assembly > C1.Data Namespace > C1DataSetLogic Class : BeforeFetch Event |
'Declaration Public Event BeforeFetch As FetchEventHandler
public event FetchEventHandler BeforeFetch
The event handler receives an argument of type FetchEventArgs containing data related to this event. The following FetchEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Command | For a bound or SQL-based table, the IDbCommand object containing the generated SQL SELECT statement. This argument is null for an unbound table. |
Filter | Filter conditions used to fill the data set. These are all filter conditions for all table views in the data set. You need to extract the filter conditions for the particular table view from this argument. |
Reader | The reader object providing the fetched data. |
Sql | The generated SQL SELECT statement. |
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 being populated. |
TableView | The table view being populated. |
TableViews | Returns the table views collection of the data set being populated. |
Before any BeforeFetch events are fired for individual table views, a BeforeFetch event is fired for the whole fetch session, with the TableView argument set to null (Nothing in Visual Basic). Use this event to execute code before any table views are fetched.
C1DataSetLogic Class
C1DataSetLogic Members
Bound, SQL-Based and Unbound Tables