Fetching the Data using TSQLDataSet
Go Up to Using dbExpress
To fetch the data
- Open File > New > Windows VCL Application - Delphi
- From the dbExpress category of the Tool Palette, drag a TSQLDataSet component to the form.
- To fetch the data for a unidirectional dataset, do one of the following:
- In the Object Inspector, set the Active property to True.
- Call the Open method at run time.
Tip: Use GetMetadata property to selectively fetch metadata on a database object. Set GetMetadata to False if you are fetching a dataset for read-only purposes.
- Set its Prepared property to True to prepare the dataset explicitly.
- Call the NextRecordSet method to fetch multiple sets of records.
Note: NextRecordSet returns a newly created TCustomSQLDataSet component that provides access to the next set of records. That is, the first time you call NextRecordSet, it returns a dataset for the second set of records. Calling NextRecordSet returns a third dataset, and so on, until there are no more sets of records. When there are no additional datasets, NextRecordSet does not return anything.