ComponentOne ADO.NET DataExtender
C1DataView Relations / Interaction with an Underlying ADO.NET Dataset / Data Fetching
In This Topic
    Data Fetching
    In This Topic

    Fetching is the process of retrieving rows from the result set and returning them to the application. You can turn on or off AutoFetching for all views in C1DataViewSet by means of the C1DataViewSet.AutoFetch property (turned on by default).


    You can control AutoFetching of a specific C1DataView data using the C1DataView.AutoFetch property. If C1DataView.AutoFetch is set to its default value, AutoFetchModeEnum.Default, then the AutoFetch mode is determined by the C1DataViewSet.AutoFetch property value of an owning C1DataViewSet.

    The following capture shows how to access the C1DataView.AutoFetch property through the C1ViewSetDesignerForm:


    If the effective value of the AutoFetch property is set to AutoFetchModeEnum.Yes, then data for underlying DataTables is fetched even if the data has already been fetched by another C1DataView.

    By changing this property value to AutoFetchModeEnum.YesIfNoData, you instruct ADO.NET DataExtender to check whether data necessary for this C1DataView has already been fetched by other fetch requests. If this is the case, then data will not be fetched repeatedly.

    Automatic fetching of foreign key lookup tables is controlled by the AutoFetchLookupTable. It has an effect only for view columns that represents a foreign key DataColumn and has the ItemListType property set to ItemListTypeEnum.ForeignKey.

    The following capture shows how to access the AutoFetchLookupTable property through the C1ViewSetDesignerForm:


    If this property is set to its default value, AutoFetchModeEnum.Default, then an effective value of this property is determined by the C1DataView.AutoFetch property value of C1DataView that this column belongs to.

    Using the Fill method

    To load data into your application, you must call the Fill method of a data adapter. When automatic data fetching is suppressed, or in order to refresh client rowsets with data from a server, you can use any of the following Fill methods:

    This method has an effect only if the column represents a foreign key DataColumn and its ItemListType property is assigned with ItemListTypeEnum.ForeignKey value

    See Also