sqlite: foreign keys

Trevor DeVore lists at mangomultimedia.com
Tue Sep 28 14:01:29 EDT 2010


On Sep 28, 2010, at 1:32 PM, Peter Haworth wrote:

> 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.

4.5 comes with 3.6.22. You can check the version of SQLite included  
with the IDE by placing the following in a card script of a stack in  
your plugin folder. Just make sure the card has a single field on it.

on preopenCard
    put specialfolderpath("temporary") into theFolder
    put theFolder & "/" & the milliseconds & ".db" into theFile
    put revOpenDatabase("sqlite",theFile,,,,) into theConn
    put revDataFromQuery(tab, cr, theConn, "SELECT sqlite_version()")  
into theData
    revCloseDatabase theConn
    put "Installed SQLite version:" && theData into fld 1
    delete file theFile
end preopenCard

-- 
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