Hi,
We’ve got a large database backend which uses copious constraints to assure data integrity and we’re also exclusively using db_managed sequences.
I think it would be useful to have an event handler for forms along the lines of ‘onPersistanceError’ or ‘onDatabaseError’ where developer could trap any database errors and pass them to a global method for ‘processing’ before alerting the user.
In our setup, without this ability to trap db-errors, we’ve needed to write stored procedures to check whether a simple delete is possible and if it is, then issue a controller.deleteRecord statement. (If the delete would cause a constraint to fail, the procedure hands back an end-user friendly message which is displayed. Without this procedure checking, the end user could get a rather uninformative and vague error dialog from Servoy.)
In our environment, if we could trap db errors I expect all the procedures wouldn’t be needed.
Is something like this possible, or does the difference in how errors are raised/reported by the various RDBMS’s make this too challenging?
Thanks!