Specifying What Data to Display
Go Up to Using dbExpress Components Index
There are a number of ways to specify what data a dbExpress dataset represents. Which method you choose depends on the Types of dbExpress Datasets you are using and whether the information comes from a single database table, the results of a query, or from a stored procedure.
- 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.