Using the function dal_wdh_wri_lis you can write records in the data base, which were edited (update operation) or newly inserted (insert operation) in DataView. DataView realizes for each records with the help of the content of the internal record ident number, which kind of operation you execute for the data base table.
If you executed an insert operation, DataView assigns a new record ident number. It is automatically entered in the internal ident number field of the mask.
If - because of wrong entries or transaction problems - it is not possible to write a record into the data base, the record-dirty-flag remains set after returning from the function dal_wdh_wri_lis (drt = m). In case of success the record-dirty-flag will be automatically reset by DataView (drt = 0). Using the function dal_mas_ret_drt_rec you can enquire the record-dirty-flag for each record.
Program the following sequence to write newly created records in the data base:
In case of relations widgets you should always specify the full name of the relation (entity-1, entity-2 and view) and then define the parent element of the relation with the function dal_wdg_set_ide.
Use dal_mas_ins_row if you want to simultaneously execute the edit_action-trigger of the mask for insert mode and enter defined default values in the fields of the records.
For instance, you could write a field entry with dal_mas_wri_fld. The newly created records do not have any ident number entries, yet.
In contrast to the update operation you need not set the field-dirty-flags for insert operations, for DataView always has to enter all columns for new records.