Hi,

I'm using a precompiled insert statement in a single transaction to perform a 
bulk insert into a database table. I have a UNIQUE constraint on the same table 
to prevent duplicate inserts and this works well. However, I also want to 
detect and count the duplicate inserts, but when I insert a duplicate row the 
error code that is returned from the sqlite_step() function is SQLITE_ERROR and 
not SQLITE_CONTRAINT as I would expect. I'm therefore unable to detect whether 
the source of the error was from a duplicate insert or some other error.

How can I detect the duplicate insert?

Regards, Olaf 

Reply via email to