RAD Studio |  |

Specifying What Data to Display
See Also
Collapse All

There are a number of ways to specify what data a dbExpress dataset represents. Which method you choose depends on the type of unidirectional dataset you are using and whether the information comes from a single database table, the results of a query, or from a stored procedure.

When you work with a TSQLDataSet component, use the CommandType property to indicate where the dataset gets its data. CommandType can take any of the following values:

- ctQuery: When CommandType is ctQuery, TSQLDataSet executes a query you specify. If the query is a SELECT command, the dataset contains the resulting set of records.
- ctTable: When CommandType is ctTable, TSQLDataSet retrieves all of the records from a specified table.
- ctStoredProc: When CommandType is ctStoredProc, TSQLDataSet executes a stored procedure. If the stored procedure returns a cursor, the dataset contains the returned records.

The following topics describe how you can specify a set of records for each type of source:

- Representing the results of a query
- Representing the records in a table
- Representing the results of a stored procedure

Note: You can also populate the unidirectional dataset with metadata about what is available on the server. For information on how to do this, see Fetching metadata into a dbExpress dataset.
See Also

Connecting to the Database Server

Types of dbExpress Datasets

Fetching the Data

Executing Commands That Do Not Return Records

Accessing Schema Information

Debugging dbExpress Applications

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