sqlite: foreign keys
Peter Haworth
pete at mollysrevenge.com
Tue Sep 28 13:32:09 EDT 2010
I think the issue is whether the version of the sqlite drivers in
LiveCode are up to date enough to include foreign key support at all.
According to http://www.sqlite.org/foreignkeys.html, foreign keys were
supported as of SQlite version 3.6.19 but I don;t know how to find out
what version of sqlite is included with LiveCode. If foreign key
support is included, it's off by default so you do have to enable it
as detailed by Trevor.
Pete Haworth
On Sep 28, 2010, at 10:00 AM, use-revolution-request at lists.runrev.com
wrote:
> Message: 14
> Date: Tue, 28 Sep 2010 07:53:40 -0400
> From: Trevor DeVore <lists at mangomultimedia.com>
> Subject: Re: sqlite: foreign keys
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <3F385A2B-214C-4867-8AF6-08887FE4691A at mangomultimedia.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> On Sep 25, 2010, at 3:42 PM, David Bovill wrote:
>
>> A quick geeky question: does anyone know if foreign key support has
>> been
>> turned on for the recent sqlite driver
>
> I don't think you need to turn it on when compiling. It is a pragma
> setting:
>
> http://www.sqlite.org/pragma.html#pragma_foreign_keys
>
> Untested but try this:
>
> revExecuteSQL theConnectionID, "PRAGMA foreign_keys = true"
>
> --
> Trevor DeVore
> Blue Mango Learning Systems
> ScreenSteps: http://www.screensteps.com
> Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
More information about the use-livecode
mailing list