Tuto WINDEV 25

Part 4: Full application with data 153 This window informs the user that a duplicate was found: indeed, the reference (that is a unique key) is identical for two products. This window is used to modify the reference value: type "REF- 338" for example. This window is one of the windows for automatic management of HFSQL errors. Remark Several errors may occur when adding or modifying a record: duplicate error, integrity error, password error, ... WINDEV proposes several modes for managing these errors: • the automatic mode : for each error that occurred when managing database records, a specific page is displayed to the user. This window allows the user to modify his data directly. • the advanced programmed mode : a procedure or a custom window for error management is called whenever an error occurs when managing the database records. The example "WD Detecting HFSQL Errors", supplied with WINDEV, allows you to check these different modes for error management. This example can be opened via the WINDEV home page (Ctrl + <), "Open an example" option. Viewing the records The new added records can be immediately viewed in the Table control of the "WIN_Menu" window. However, in some cases (when running tests for example), you may want to see the content of the data file directly. WINDEV proposes a tool used to view the content of data files while the application is being developed (when the viewing windows have not been created yet). This tool is named WDMAP. We are going to use it to see the content of the Product data file. ▶ To start WDMAP: 1. On the "Tools" pane, in the "Database" group, click "WDMap". 2. Select the "Product" data file. The data file content is displayed. 3. Sort the elements by reference (click the header of the "Reference" column) and the two added records appear.

RkJQdWJsaXNoZXIy NDQ0OA==