SQLite: how to open existing database in memory

Glen Bojsza gbojsza at gmail.com
Sat Oct 17 10:21:27 EDT 2015


I am trying to open an existing SQLite database in memory.

When I do this (or think I do this) I get a database connection ID but the
it errors out when I try just to show the current data?

On OS X Mavericks LC 8 DP4

*on* mouseUp

   *put* "/Users/Dev/Documents/Ratings.db3:memory:" into tDatabasePath

   *put* revOpenDatabase("sqlite", tDatabasePath, , , , ) into tDatabaseID

   *put* "Connection = " & tDatabaseID  -- if I get an integer then a
database connection has been made

   *put "SELECT * from Movies" into tSQL*

   *put* revDataFromQuery(tab,*return*,tDatabaseID,tSQL) into myresults

   *put* myresults

   revCloseDataBase tDatabaseID

*end* mouseUp


My output:

Connection = 1         (shows I have a database connection)

revdberr,Database Error: no such table: Movies


Any suggestions?

thanks,

Glen



More information about the use-livecode mailing list