On 14 Sep 2011, at 9:46pm, Fabio Spadaro wrote:

> Hello. I use sqlite3 python.
> I followed exactly the steps to create a foreign key from the site
> http://www.sqlite.org/foreignkeys.html but I still can insert enter values
> not ​​allowed for constraint.

So you get no error from the INSERT command, and you can also find the new row 
using SELECT ?

> Before I do the insert properly executed the instruction "PRAGMA
> FOREIGN_KEYS =ON" but did not return any data, the site shows that if the
> result is not 0 or 1
> then either the version of sqlite is more old of 3.6..19 (MAKES IT IS MY
> VERSION 3.6.22) or it has been compiled with SQLITE_OMIT_FOREIGN_KEY
> SQLITE_OMIT_TRIGGER ago.
> Someone can give me light?

Make a connection to the database.
Issue "PRAGMA foreign_keys" and look at the value returned.
Issue "PRAGMA foreign_keys = OFF".
Issue "PRAGMA foreign_keys" and look at the value returned.
Issue "PRAGMA foreign_keys = ON".
Issue "PRAGMA foreign_keys" and look at the value returned.

Please post a follow-up with the three values.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to