TGQuery

From Gestinux Wiki
Revision as of 22:31, 17 October 2012 by Tintinux (talk | contribs) (Created page with " == Purpose == TGQuery is the only way used in Gestinux to display data from tables or Sql queries. You can drop a TGQuery on a form, to be used by a TGDbGrid. They are ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose

TGQuery is the only way used in Gestinux to display data from tables or Sql queries.

You can drop a TGQuery on a form, to be used by a TGDbGrid. They are linked by a TDataSource in the usual way.

You can also create dynamically a TGQuery. The Create constructor assign in one time the TGDbConnection, and Sql code, and open the query. Currently, bind parameters can't be assigned before opening : include the values in the Sql query.

When editing is requested, set the 3rd optional parameter to true : it will try to lock the retrieved record, If the record is already locked, a message is automatically displayed, allowing the user to wait or cancel.