Questions about SQLite and directories

If I have a SQLite3 database "data.db" in system.ResourceDirectory, am I allowed to open it and do SELECT statements on it? The documentation has some very strong words about using files in this area.

Also, I have a Windows 7 machine and running Corona Simulator. Where is it storing the .db file for system.DocumentsDirectory??? I know it exists somewhere, because data is persisting.. but I can't find it. A start menu search on my computer for "data.db" comes up with nothing. Hmm.

u can access project sandbox from corona simulator menu.

system.resourceDirectory is your App Bundle and if you change anything, the checksums are not going to add up and you risk having your app not work.

But as long as you're doing READ ONLY operations, I would think you can read a sql DB in the resource folder.

to find out where the file is - aka system.DocumentsDirectory

local filePath = system.pathForFile( "data.db", system.DocumentsDirectory )

print( filePath )

look at the debugger window and it should be printed there.

good luck

LArry

views:1529 update:2011/9/27 18:14:54
corona forums © 2003-2011