RAD Studio |  |

Using TSimpleDataSet
See Also
Collapse All

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:
   - Set CommandType to ctQuery and set CommandText to an SQL statement you want to execute on the server.
   - Set CommandType to ctStoredProc and set CommandText to the name of the stored procedure you want to execute.
   - Set CommandType to ctTable and set CommandText to the name of the database tables whose records you want to use.
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

dbExpress Components

Configuring TSQLConnection

Specifying Display Data

Fetching the Data

Executing the Commands

Accessing Schema Information

Using TSQLTable

Using TSQLStoredProc

Using TSQLQuery

Using Unidirectional Datasets

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!