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.