Hi. 2011/9/15 Simon Slavin <[email protected]>
> > On 15 Sep 2011, at 4:36pm, Fabio Spadaro wrote: > > > i just installed python 2.7.2 and the value returned by "PRAGMA > > foreign_keys" is [(0,)]; Later I will try with the tables. > > Can you tell whether your python installation process is installing a new > version of whatever sqlite API you're using ? Depending on how it's > packaged it might be part of it or it might be separate. > > Please do this entire sequence: > > Make a connection to the database. > Issue "PRAGMA foreign_keys" and look at the table returned. > Issue "PRAGMA foreign_keys = OFF". > Issue "PRAGMA foreign_keys" and look at the table returned. > Issue "PRAGMA foreign_keys = ON". > Issue "PRAGMA foreign_keys" and look at the table returned. > > We can tell a lot by looking at the results, including whether your version > was compiled without foreign key support. > > Note that foreign key support is always initially off. Currently you are > expected to do "PRAGMA foreign_keys = ON" each time you open a database even > if you have previously used foreign keys with it. > > Simon. > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > Sorry but I was wrong from the beginning; the result of "pragma ..." was wrong with python version 2.6 because each result were not processed in the same connection but different connections of database. -- Fabio Spadaro www.fabiospadaro.com _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

