sqlite: foreign keys

Trevor DeVore lists at mangomultimedia.com
Tue Sep 28 14:05:39 EDT 2010


On Sep 28, 2010, at 2:01 PM, Trevor DeVore wrote:

> 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

Actually, you don't even need the temporary file. Just use an in- 
memory db.

on preopenCard
   put revOpenDatabase("sqlite",,,,,) into theConn
   put revDataFromQuery(tab, cr, theConn, "SELECT sqlite_version()")  
into theData
   revCloseDatabase theConn
   put "Installed SQLite version:" && theData into fld 1
end preopenCard

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com

Email has been scanned for viruses by Altman Technologies' email management service - www.altman.co.uk/emailsystems



More information about the use-livecode mailing list