Thanks for the insight, it at least gives me something to look into.
I don’t have a copy code in place to move my database file. however here is how I am initiating my database:
require "sqlite3"
local path = system.pathForFile("mydatabase.db", system.DocumentsDirectory)
db = sqlite3.open( path )
So I believe I am creating the database in the right location and dont need to copy it.
here is the code for the specific table i am creating where this doesn’t take effect:
local tablesetup = [[CREATE TABLE IF NOT EXISTS collection (keyid INTEGER PRIMARY KEY,numCollected INTEGER not null,lastCollected DATE,currentStage INTEGER not null,currentStageStartDate DATE,stage1Pic varchar(20) not null,stage1Title varchar(20) not null,stage1Desc varchar(20) not null,stage2Pic varchar(20) not null,stage2Title varchar(20) not null,stage2Desc varchar(20) not null,stage3Pic varchar(20) not null,stage3Title varchar(20) not null,stage3Desc varchar(20) not null,stage4Pic varchar(20) not null,stage4Title varchar(20) not null,stage4Family varchar(20) not null,stage4Genus varchar(20) not null,stage4Spec varchar(20) not null,stage4Desc varchar(20) not null,stage4URL varchar(20) not null,stage4Audio varchar(20) not null);]]
db:exec( tablesetup )
So i am wondering if i am creating the table correctly, again it all works in the simulators…
So in the code where i do the update, newStage is a number as well as my rowCount…
[code]
local defaultValue = [[UPDATE collection SET currentStage = ‘]] … newStage … [[’ WHERE keyid = ‘]] … rowCount … [[’;]]
db:exec( defaultValue );
[/code] [import]uid: 67604 topic_id: 17444 reply_id: 66275[/import]