Note: The information contained in this document applies to OpenInsight for Workgroups v3.11 Pre-release Build 9 and above.
Rollback on Clear
In DataSet-bound forms, concurrency is often implemented by using the "Select for Update" SQL clause in the DataSet's Select method. The form is populated by the READ event, which sends a DSOEXECUTE event for each DataSet, which in turn executes the DataSet's Execute method. At this point, using "Select for Update", the selected rows are locked in the database. If the user chooses to clear the form (F8 with the standard menu), the locks will remain unless the transaction is rolled back. To tell the form to automatically roll back the transaction during CLEAR processing, set field 9 of the IOOPTION property to true:
declare subroutine Set_Property
declare function Get_Property
$insert Logical
Options = Get_Property(@window, "IOOPTIONS")
* roll back transactions during form clear processing
Options<9> = TRUE$
Set_Property(@window, "IOOPTIONS", Options)
For backwards compatability, the default value for the ninth field of IOOPTIONS is false, so the CLEAR event will not roll back transactions by default.
Required Field Processing Only on Save
Data entry controls can be marked as required in the Form Designer by checking the "Required" checkbox in the control's properties dialog. The required field processing, which is part of the system lost-focus processing, does not allow the user to leave a required field that is blank. This can produce undesired results, however; for example, while on a blank required field, the user cannot click on a toolbar button. A new option has been added so that required field processing is only enforced at save time, when the system checks to make sure that all required fields are filled in. To use the new option, set field 10 of the IOOPTION property to true:
declare subroutine Set_Property
declare function Get_Property
$insert Logical
Options = Get_Property(@window, "IOOPTIONS")
* allow users to tab through or otherwise leave blank required fields
* but still check all required fields before saving the data
Options<10> = TRUE$
Set_Property(@window, "IOOPTIONS", Options)
For backwards compatability, the default value for the tenth field of IOOPTIONS is false, so that the user cannot leave a blank required field.