Board index » delphi » trapping key violation error when inserting new record using SQL

trapping key violation error when inserting new record using SQL

I recently started using SQL to controll my database, but is it possible to
trap the errors created by Delphi with my own messages.
For example, if I insert a new (duplicate) item using the Insert command
with SQL, the key violation is vague, and I would like to put in my own dialog
so the users can understand the problem in their own language instead of 'key
voilation'.

Please help me out on this, it can't be hard, but I couldn't find it in the
books.

 

Re:trapping key violation error when inserting new record using SQL


In article <socav.5.000B0...@euronet.nl>

Quote
so...@euronet.nl (Fred_Blok) wrote:

Yes. BDE errors can be trapped.

Murali

----------------------------------------------------------------------------------------------------------
Murali Kazhipurath
Lead Technical Consultant
Kaustubam Systems, Inc. (Database and Internet Solutions Provider)
Roseville, CA 95747
Phone: (916) 773 1918
-----------------------------------------------------------------------------------------------------------

Quote
> I recently started using SQL to controll my database, but is it possible to
> trap the errors created by Delphi with my own messages.
> For example, if I insert a new (duplicate) item using the Insert command
> with SQL, the key violation is vague, and I would like to put in my own dialog
> so the users can understand the problem in their own language instead of 'key
> voilation'.

> Please help me out on this, it can't be hard, but I couldn't find it in the
> books.

-

Other Threads