I found out recently that sometimes on a per-session basis, you have to turn the foreign key check on. So even though one provider has it on by default, another may not.
http://www.sqlite.org/pragma.html#pragma_foreign_keys I had a SQLite3 Database manager running, and the SQL to delete a row from the table worked, however, the exact same line (Copied from code to the S3DM) didn't. Found this link on the interwebz, and it worked. On Mon, Oct 1, 2012 at 8:10 AM, Clemens Ladisch <[email protected]> wrote: > David Richardson wrote: > > I’m having some sort of bug with system.data.sqlite. > > when I try to delete it should cascade , but 'on cascade delete’ does > NOT work. > > In SQLite, it's called "on delete cascade": > > sqlite> pragma foreign_keys=on; > sqlite> create table parent(id integer primary key); > sqlite> create table child(id integer references parent(id) on delete > cascade); > sqlite> insert into parent values(1); > sqlite> insert into child values(1); > sqlite> select * from child; > 1 > sqlite> delete from parent where id = 1; > sqlite> select * from child; > > > Regards, > Clemens > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

