ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Example: Managing the duplicates error on an addition
HErrorDuplicates (Example)
Example: Managing the duplicates error on an addition
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)AjaxHFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses) This example is used to manage the duplicate errors that may occur when a record is added into the CUSTOMER file. The automatic management of errors was disabled beforehand (HOnError).
// No automatic management of errors (duplicates, integrity, ...)
HOnError(CUSTOMER, "")
IF HAdd(CUSTOMER) = False THEN
IF HErrorDuplicates() = True THEN
Error("Duplicate error on unique key", HErrorInfo())
RETURN
END
IF HErrorIntegrity() = True THEN
Error(HErrorInfo())
RETURN
END
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help