Handling OLE DB Error messages in ASP
Posted on 2003-11-06
I have been asked to put a delete key on certain database fields in an application and know that the ASP will fall over if the user tries to delete a record which is linked to another record in another table which is referentially linked - I have forced this in the relationship.
I do not want all associated records deleted but I do wnat to capture the error message and present it in a more user friendly way.
How do I capture the following screen info so that I can re-present it in a nice neat table.....
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] The record cannot be deleted or changed because table 'Product' includes related records.
/stone/product_select_maintenance.asp, line 218