- Sivaprakash BKR
- PowerBuilder
- Tuesday, 24 December 2019 08:44 AM UTC
Hello,
Using PB 2017 R3, Postgresql 11
Want to display better error message(s) to users, when error(s) returned by database. All users can't understand message(s) like Primary key violation, check constraint error, Unique key violation etc..
Currently I used to display the error message and error code, returned by the database. It starts with
SQLState = P0001
ERROR: Partially Paid. Cannot Delete...; Error while executing the query;
No Changes Made to Database;
Update test_table SET Code = '100' where Code = '200'
This error message says something, as it's raised using RAISE EXCEPTION in a trigger. For Primary Key Violations, Unique Key Violation.. and for others, we may not get such messages.
How such messages could be translated that's understandable to the users?
Currently I display it in the DBError event itself. But this blocks other users, in multi-user environment, from proceeding till this messagebox is closed.
Would like to have your advice regarding the displaying the error messages in a better way and the place (event) where it could be displayed.
Happiness Always
BKR Sivaprakash
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.