Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Exception Messages

Status
Not open for further replies.

cpmasesa

Programmer
Oct 24, 2002
78
AE
Hi,

I am writing a database app with D6 and Access2k using ADO.

Sometimes when i attempt to delete or post a record through the application i get an exception.

i would like to respond with my custom messages depending on the exception:
1. missing required fields,
2. missing master table record,
3. dependent records in other table

How do i get the exception type (?), the table that caused the exception and the reason fro the exception so that i can then write my own message to respond to the exception?

TIA
 
If you havnt already look at the try / except construct using this you can trap exceptions and display your own message in the except part.
If you look in the help on try/except you will also find information on how to obtain the exception information.
steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top