Query mit Query

 

QueryQuery shows how to handle a non-editable amount of data to manipulate the data.

In addition, the settings of the database fields were not made in the program code but in the ZQuery and DBGrid components. Double-click on the ZQueries or the DBGrids show (see picture above) the respective list of fields. The first time, the fields have to be taken over by the corresponding buttons. On this occasion you can exclude certain fields. After selection, the order of the fields can be changed using the up and down arrows. By clicking on a field attributes can be assigned to this field, such as the visible width of the field or the title, which then does not coincide with the name of the database field, etc.

The components used on the site are now known. If not, the page "Edit Table" should be worked through first. I would like to comment briefly on the linking of the tables, the functionality is also explained in "Edit Table".

An amount of data is generated here by means of an SQL query, which is displayed on the top left. This query covers 2 tables and is therefore not editable. However, linking this query to another ZQuery, with only one table in access at a time, can manipulate the data. So you can create a complex SQL query and make certain data easily editable.

Now to the three tables on the right. The first two from the top show only one line at a time. These are assigned exactly to the query. The third DBGrid (DBGrid6) at the bottom right shows all communication data of the respective address.

 

In the picture above we see the links of the ZQueries that are assigned to the DBGrids on the right side.

First ZQueryQQAdress: Here the ADDRESSID of the query ZQueryQQSearch is linked with the ADDRESSID of ZQueryQQAdress. This means that only the one address accessed in the query is displayed.

For ZQueryQQContact, the CONTACTID of the ZQueryQQSearch query is linked to the CONTACTID of ZQueryQQContact. This means that only the one contact accessed in the query is displayed.

For ZQueryQQAllContacts, the ADDRESSID of the ZQueryQQSearch query is linked to the ADDRESSID field of ZQueryQQContact. This is the same procedure as on the Edit Table page. This means that all contacts will be shown to the address accessed in the query.

 

Description ZQuery

 <>

 

© CMBasic.de