Using TSimpleDataSet

From RAD Studio
Jump to: navigation, search

Go Up to How To Perform Database Procedures

TSimpleDataSet is a special type of client dataset designed for simple two-tiered applications. Like a unidirectional dataset, it can use an SQL connection component to connect to a database server and specify an SQL statement to execute on that server. Like other client datasets, it buffers data in memory to allow full navigation and editing support.

To use TSQLStoredProc

  1. From the dbExpress category of the Tool Palette, drag a TSimpleDataSet component to the form.
  2. Set its Name property to a unique value appropriate to your application.
  3. From the dbExpress section of the Tool Palette, drag a TSQLConnection component on the form.
  4. Select TSimpleDataSet component. Set the Connection property to TSQLConnection component.
  5. To fetch data from the server, do any of the following:
  6. If the stored procedure returns a cursor to be used with visual data controls, add a data source component to the form.
  7. Set the DataSet property of the data source component to the TSimpleDataSet object.
  8. To activate the dataset, use the Active property or call the Open method.
  9. If you executed a stored procedure, use the Params property to retrieve any output parameters.

See Also