I’ve just started to build a simple database with Lita (http://www.dehats.com/drupal/?q=node/58) and once I created a table called myTable I go to the SQL tab and press “Save in SQL File”. I put the file in the User/Library/Application Support/Corona Simulator/myApp/Documents folder and I name it myDatabase.db
Then in Corona I write this:
local path = system.pathForFile("myDatabase.db", system.DocumentsDirectory)
db = sqlite3.open(path)
--print all the table contents
for row in db:nrows("SELECT \* FROM myTable") do
local text = row.content.." "..row.content2
local t = display.newText(text, 20, 30 \* row.id, null, 16)
t:setTextColor(255,0,255)
end
When I start my app, the Corona Terminal says:
no such table: myTable
[import]uid: 24111 topic_id: 20167 reply_id: 320167[/import]