What type client are you using?

With the C API you would test for the return value (0 or 1) and process accordingly.

You could use 'INSERT IGNORE' syntax, but then you would not know what records failed (you could test for how many were inserted with mysql_info() using the C API).

See Chap 6 around page 421 of the MySQL Reference Manual.

I hope this helps...

Pat...

[EMAIL PROTECTED]
CocoNet Corporation
SW Florida's First ISP
825 SE 47th Terrace
Cape Coral, FL 33904
(239) 540-2626 Voice


----- Original Message ----- From: "Bruce Martin" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Sunday, November 13, 2005 3:58 PM
Subject: Duplicate Insert Crashes Client


Hello again,

Ok new problem. If for some reason, my client tries to INSERT something to the database that is identical to a record already there, my client crashes. Is there an error I can trap for this? The DB does insert the new record.

Bruce Martin
The Martin Solution
PO Box 644
Delaware Water Gap, PA
(570) 421-0670
[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to