Error Trapping for dups and other

Creating and using forms
Post Reply
gkick
Posts: 324
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

Error Trapping for dups and other

Post by gkick »

Hi all,

recently found this gem viewtopic.php?f=61&t=68434
relating to error trapping avoiding duplicates, which works beautifully. If I remember correctly Access had/has error codes which made intercepting errors fairly straight forward.
The code in the link for making a friendlier error message says SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'already exists'; , however the code in the non handled error just says constraint or index violation. (How does one extrapolate the error number aka 45000 ?)
Where can one find other codes such as for intercepting if a table is read only. The HSQDB manual does not seem to have any info on this.
Thanks
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Post Reply