Hello Olaf, I do an "INSERT OR IGNORE" and in the STEP I count the changes to the DB. If there are no changes, then the insert was a duplicate.
C Saturday, October 20, 2007, 8:31:05 PM, you wrote: OBL> Hi, OBL> I'm using a precompiled insert statement in a single transaction OBL> to perform a bulk insert into a database table. I have a UNIQUE OBL> constraint on the same table to prevent duplicate inserts and OBL> this works well. However, I also want to detect and count the OBL> duplicate inserts, but when I insert a duplicate row the error OBL> code that is returned from the sqlite_step() function is OBL> SQLITE_ERROR and not SQLITE_CONTRAINT as I would expect. I'm OBL> therefore unable to detect whether the source of the error was OBL> from a duplicate insert or some other error. OBL> How can I detect the duplicate insert? OBL> Regards, Olaf -- Best regards, Teg mailto:[EMAIL PROTECTED] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

