Thanks for Your help I get three lines
explain pragma foreign_keys = on "0" "Init" "0" "1" "0" "" "00" "1" "Expire" "0" "0" "0" "" "00" "2" "Halt" "0" "0" "0" "" "00" explain pragma do_what_i_want "0" "Init" "0" "1" "0" "" "00" "1" "Halt" "0" "0" "0" "" "00" Is think it has to do with the entity framework. When I am using ExceuteStoreQuery or SqlQuery the foreign_keys is always 0. Regards Urs -----Original Message----- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Clemens Ladisch Sent: Thursday, September 13, 2018 2:23 PM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] foreign_keys = 0N with Entity Framework 6.2.0 Urs Wagner wrote: > Simon Slavin: >> On 12 Sep 2018, at 2:04pm, Urs Wagner <urs.wag...@man-es.com> wrote: >>> The following code is returning 0. Why? >>> >>> ExecuteStoreQuery<int>("PRAGMA foreign_keys;").First(); >> >> You coerce the result of the call into an integer. Can you make the call >> and display (or use a debugger to see) exactly what it's returning ? > > The result cannot be coerced into a string (compiler error). How exactly did you try that? Anyway, how many rows does the corresponding EXPLAIN return, two or three? sqlite> explain pragma foreign_keys = on; addr opcode p1 p2 p3 p4 p5 comment ---- ------------- ---- ---- ---- ------------- -- ------------- 0 Init 0 1 0 00 Start at 1 1 Expire 0 0 0 00 2 Halt 0 0 0 00 sqlite> explain pragma do_what_i_want; addr opcode p1 p2 p3 p4 p5 comment ---- ------------- ---- ---- ---- ------------- -- ------------- 0 Init 0 1 0 00 Start at 1 1 Halt 0 0 0 00 Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users