Is there any mechanism to suppress error message that are displayed when database query fails, Currently the entire table structure is revealed to the end-user when a database query fails, this is not acceptable in production site.

Apart from selection of the just inserted record, is there a way to check whether insert query has been successful or not?

Thanks