Page 1 of 1

ESQLiteError "constraint failed"

Posted: Tue 03 Nov 2009 22:58
by skippy
Hi,

using SQLite with UniDAC I always get an exception "constraint failed" at any point in time, can't really find out where exactly, or under which circumstances.

Anyone having an idea ?

Thanks

Posted: Wed 04 Nov 2009 10:38
by Plash
You may get this error if you insert records with duplicate primary key values.

Posted: Wed 04 Nov 2009 15:12
by skippy
But the Primary Key Value is the AutoIncrement ID:

[ID] INTEGER PRIMARY KEY AUTOINCREMENT,

Posted: Fri 06 Nov 2009 12:27
by Plash
Check what other constranits your table has. It could be UNIQUE or CHECK constraints.

Posted: Sun 29 Nov 2009 10:37
by skippy
Yes, there was another unique index, I was first looking in an older version of the table... :(
Thanks for the hint and *this DB component is really great*

Rgds