4.2. Other kind of DML queries: INSERT, UPDATE and DELETE

As stated in the previous section, the other cases of DML queries (INSERT, UPDATE and DELETE SQL commands) are automatically created from the corresponding SELECT query.

Having defined a SELECT query using the interface described in the previous section, the user can attach one or more 'grids' and 'forms'. The grids and forms depend exclusively on one query (this is why they are listed in the 'Queries' page of the main window, under the query on which they depend).

Wiews and forms can be edited for their properties. The most important property is, in case the query deals with several tables at the same time (using joins), the table which gets modified when data is inserted, updated or deleted.

Figure 4-6. View and Form properties edition

As shown in the figure above, the dialog is divided in three zones:

4.2.1. Grid (or tabular) view

The grid view (also called tabular view) is a table displaying the result of a SELECT query. There is one result on each row of the view; this is the usual way of presenting the result of a SELECT query.

Figure 4-7. Example of grid (or tabular) view

4.2.2. Forms

A form is the interface used to manipulate one row of a resultset: to insert new data, update or delete some data retrieved by a SELECT query; To use this feature, the user must already have selected a table which is to be modified. I the form, only the fields which belong to that table will appear, not all the fields which are part of the result of the query.

Figure 4-8. Example of form view

If, for a query, no form has been defined, then a simple default one is dynamically created by gASQL when needed.