I am having an application developed in dbforms. It involves a single table with basic transactions add,update,delete. While adding a record, i want to check for the uniqueness of the data entered by the user. Actually, there is a database unique constraint set in the table. If I try to add a new record with the existing data, it throws the sql exception - unique constraint violated and the error message is displayed on the screen as it is..Is there any way to catch the exception and customize the message ? Or, can i do the business validation for the same before it is caught as sql exception ?
Expecting the solution.
Thanks in advance,
vinoth
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having an application developed in dbforms. It involves a single table with basic transactions add,update,delete. While adding a record, i want to check for the uniqueness of the data entered by the user. Actually, there is a database unique constraint set in the table. If I try to add a new record with the existing data, it throws the sql exception - unique constraint violated and the error message is displayed on the screen as it is..Is there any way to catch the exception and customize the message ? Or, can i do the business validation for the same before it is caught as sql exception ?
Expecting the solution.
Thanks in advance,
vinoth
NO you can't catch the exception. But you can write an interceptor to do the validation!
Henner