FAQ
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...

patrick@coconet.com
CocoNet Corporation
SW Florida's First ISP
825 SE 47th Terrace
Cape Coral, FL 33904
(239) 540-2626 Voice


----- Original Message -----
From: "Bruce Martin" <bmartin@mac.com>
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
bruce@martinsolution.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=patrick@coconet.com

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupmysql @
categoriesmysql
postedNov 13, '05 at 8:56p
activeNov 15, '05 at 10:07a
posts4
users3
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2022 Grokbase