RAD Studio
ContentsIndex
PreviousUpNext
Specifying What Data to Display

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:
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.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!