Show: Delphi C++
Fetching the Data using TSQLDataSet
From RAD Studio XE2
Go Up to How To Perform Database Procedures
To fetch the data
- Choose File > New > Other .The New Items dialog appears.
- In the New Items dialog, select Delphi Projects and double-click VCL Forms Application. The Windows Designer displays.
- 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:
- 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.