score sql not work in device

I have build two db for my game. One for each stage score and the other for highest score.
Both of it work in simulator. But after build to device it didn’t work.

I store in document directory. Do I need to copy the db to device by myself.

Any implementation step for this?

KC [import]uid: 94613 topic_id: 17289 reply_id: 317289[/import]

the db will be in the resource directory ,and you cannot write to it, so you have to copy it from the resource directory to the documents directory yourself and write to it.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 17289 reply_id: 65353[/import]

Thanks for your reply.

I saw some discussion in forum. There are few line of code to copy from resource to document if the db is not there. I’m wondering is there any other method to do it.
KC [import]uid: 94613 topic_id: 17289 reply_id: 65381[/import]

you could create the db using “create table” type SQL commands

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 17289 reply_id: 65388[/import]

Ok, I get it. To use create table to build the db inside document directory. thanks

KC [import]uid: 94613 topic_id: 17289 reply_id: 65394[/import]