Is there any way to get more information from SQLite when a constraint
fails, particularly which field caused the constraint to fail?

Ideally the error message should list the field name that caused the
constraint to fail, the bad value, and even the constraint itself.


This is what I get...

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>sqlite3
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> create table t(a int check(typeof(a) = 'int'));
sqlite> insert into t values ('1');
SQL error: constraint failed
sqlite>


This is what would be nice....

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>sqlite3
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> create table t(a int check(typeof(a) = 'int'));
sqlite> insert into t values ('1');
SQL error: constraint failed: text value '1' failed to pass constraint
(typeof(a) = 'int')
sqlite>


I first reported this when I started working with SQLite.

http://www.sqlite.org/cvstrac/tktview?tn=2258

Thanks,

Sam

-- 
-----------------------------------------------------------------
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer.
Position is in the Washington D.C. metro area. Contact
[EMAIL PROTECTED]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to