Copying Database to Documents folder

Hello,

I just downloaded the Corona SDK for Windows a couple days ago and am working with SQLite in a test app.

I am having an issue when trying to deploy by existing SQLite database. I followed the great example in this post:

http://developer.anscamobile.com/forum/2010/09/25/sqlite-writes-crashing-app-only-selects-my-app

but still no luck. Once deployed, I cannot read my database. I did notice that when the database copy happens (running on the simulator), the DB file in my Documents folder in the sandbox is only 3KB where my DB file I am including is over 500KB. Is it possibly only copying the DB structure and not the contents? Is there a parameter I might be missing.

Coming from Visual Studio, I am having troubles getting my head around debugging in this environment, it'll come though I suppose!

Thanks for any help.

That appears to be a bug in the Windows simulator -- file copy does not work correctly. I filed a bug about that. What happens when you build/run on a device? It may be an issue only on the simulator.

Tim

That appears to be a bug in the Windows simulator -- file copy does not work correctly. I filed a bug about that. What happens when you build/run on a device? It may be an issue only on the simulator.

Tim

Thanks Tim. It's not working on the device either. But I think I may be slowly figuring it out.

It might be the size of the DB I am reading in. I saw some other posts that said the OS will hang the app if it loads too slowly. I tried it with a subset of records and I can get them to appear. Still having some issues copying it over to the Documents folder at runtime but I'm getting closer.

views:1542 update:2011/10/10 9:00:20
corona forums © 2003-2011