Hi Suser,
In the initialization of you Project add the code:
HOnError("*", hErrDuplicates + hErrIntegrity, ErrorOnDataBase)
Then, define the procedure ErrorOnDataBase like this:
PROCEDURE ErrorOnDataBase()
SWITCH HError(hErrCurrent)
// Duplicate Record
CASE 70010
ErrorBuild("Duplicate Error on File: %1, Record: %2, Field: %3", HErrorInfo(hErrFile), HErrorInfo(hErrRecNum), HErrorInfo(hErrItem), "The operation abandoned.")
// File Integrity
CASE 70015
Error("Integrity Error", HErrorInfo(hErrFullDetails), "The operation abandoned.")
END
RESULT opCancel
Hope to help
Regards
Vassilis Boutsikas
Edited 1 time(s). Last edit at 10/22/2019 01:06PM by Vassilis.