The DBQuery is inherited from the DBTable component and maintains a database table in your database. In this case, you must supply your own SQL instead of using a table name. If you need to use CRUD then you can apply a CRUD component to supply individual SQL statements for each action.

DBQuery is extremely useful for creating reporting grids based upon free queries.

Properties


Description

AutoSync

Automatically synchronize result dataset after update

DBConnection

Name of the predefined connection id's.

Fields

The fields of the table that will be used by the components referring to this component.

MasterDataMapping

Mapping of key fields between master and detail

MasterDataSource

Datasource of the master table (only required on master-detail relationships)

Query

Reference to a query setup. Opens the Query Builder to create your SQL in a visual way. Useful for complex queries, or if you require links (cloud connection) to another query in another application.

ResultCache

Changes the search result in an SQLite table. Needed for bidirectional access. SET TO FALSE if this table is used as detail. Because of the caching, accessing this table will reopen the last result causing wrong results if you are using it as detail. B.t.w. if you set a master data source this field is automatically set to false.

ResultLimitCount

Nobody is scrolling hundreds of pages to find a result. This field limits the number of records found on a search for better performance.

ResultLimitOffset

Startpoint within a resultset

Resultlimitstm

Statement for limiting resultset. Needed for compatibility. If not set, the system will use the settings at the database. Required due to the fact that there is no standard Ansii syntax for limiting result

ResultUseLimit

If set to false then the full resultset will be retrieved

SQL

SQL statement to execute. Use only if you haven't used the query property. Very useful in applying SQL statements in the code.

SQLCrud

Reference to a SQL Crud component (containing crud SQL statements)


PHP Events


Description

onAfterDelete

Fires after the database has completed the delete operation

onAfterInsert

Fires after the database has completed the insert operation

onAfterOpen

Fires after the table has been opened (executed the basic SQL query)

onAfterUpdate

Fires after the table has been completed the update operation

onBeforeDelete

Fires before the database will perform the delete operation

onBeforeInsert

Fires before the database will perform the insert operation

onBeforeOpen

Fires before the database will perform the basic SQL query

onBeforeÙpdate

Fires before the database will perform he update operation


Javascript events

No additional events