TGQuery

From Gestinux Wiki
Revision as of 23: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
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.