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

Reply via email to