trapping key violation error when inserting new record using SQL 
Author Message
 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.



Wed, 18 Jun 1902 08:00:00 GMT  
 trapping key violation error when inserting new record using SQL


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.

-


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PLEASE HELP! SQL Insert key violation error

2. Key violation when posting new record

3. Key violation error on adding record to empty table

4. Trap Key Violation

5. How can I trap key violations?

6. Trap Insert Key in DB Grid

7. How to INSERT a RECORD using SQL??

8. Using SQL to insert record wth memo

9. Key Violation occurs before 'Before Insert'

10. INSERTing Tdataset and Key Violation

11. Insert Key Violation

12. copying data from one record to the next when inserting a new record

 

 
Powered by phpBB® Forum Software