RAD Studio
ContentsIndex
PreviousUpNext
Using TSQLQuery

TSQLQuery represents a query that is executed using dbExpress. TSQLQuery can represent the results of a SELECT statement or perform actions on the database server using statements such as INSERT, DELETE, UPDATE, ALTER TABLE, and so on. You can add a TSQLQuery component to a form at design time, or create one dynamically at runtime.

To use TSQLQuery

  1. From the dbExpress category of the Tool Palette, drag a TSQLQuery component to the form.
  2. In the Object Inspector, set its Name property to a unique value appropriate to your application.
  3. Set the SQLConnection property.
  4. Click the ellipsis button next to the SQL property of the TSQLQuery component. The String List editor opens.
  5. In the String List editor, type the query statement you want to execute.
  6. If the query data is 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 query-type dataset.
  8. To activate the query component, set the Active property to True or call the Open method at runtime.

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