Database file not copied onto the device while building android app with corona

I am comparatively new to android programming and especially corona… pls help

runtime error /users/jenkins/slave root/workspace/templates/label/android/subrepos/composer/composer.lua:1451:no such table 

This is the error I am getting when the app installed and ran on my device. The app runs perfectly in the simulator. I doubt that the database file is not copied onto the device or not in the correct path. I would like to know where should and how should I copy the database file for my app…

My database coding lines are as follows:

local path = system.pathForFile( “gContacts.db”, system.DocumentsDirectory )

db = sqlite3.open( path )

local people = {}  – Begins empty

local nameList = {}

local tablesetup = [[CREATE TABLE IF NOT EXISTS civilf (Index INTEGER PRIMARY KEY, Name, Phone, email);]]

print(tablesetup)

db:exec( tablesetup )

for row in db:nrows(“SELECT * FROM civilf”) do

    print( "Row " … row.Index )

Thanks in advance

That error hints that you’re trying to load a composer scene and the composer scene has an error and it probably has nothing to do with your SQL.

Are there any additional messages in your console log that might help us figure out what’s going on?

Rob

When i changed the directory from Documents to Resource, the problem solved. But as per the forum exple or sample programs, it is not working …any way thanks for the timely reply…pls check if it is working with documents directory…

That error hints that you’re trying to load a composer scene and the composer scene has an error and it probably has nothing to do with your SQL.

Are there any additional messages in your console log that might help us figure out what’s going on?

Rob

When i changed the directory from Documents to Resource, the problem solved. But as per the forum exple or sample programs, it is not working …any way thanks for the timely reply…pls check if it is working with documents directory…