SQLite & Android
Posted: Mon Nov 14, 2011 5:15 pm
Im porting an iOS app I wrote at the moment that uses sqlite.
In the app I use the following commands...
In the preopen stack I use the following to get the path to the documents
put specialFolderPath("documents") into gPathToDocuments
When its time to open the database I call...
put gPathToDocuments & "progress.db" into dbPath
put revOpenDatabase ("sqlite",dbPath,,,,) into gProgressDBID
On iOS this works fine, if the file isnt found it is created, however on android the 2nd line here causes my App to stop, ie. anything after this line is not processed.
The dbPath always seems to be returned as '/progress.db' which seems wrong to me.
Whats the best way to get this working on android???
Thanks
Andy
In the app I use the following commands...
In the preopen stack I use the following to get the path to the documents
put specialFolderPath("documents") into gPathToDocuments
When its time to open the database I call...
put gPathToDocuments & "progress.db" into dbPath
put revOpenDatabase ("sqlite",dbPath,,,,) into gProgressDBID
On iOS this works fine, if the file isnt found it is created, however on android the 2nd line here causes my App to stop, ie. anything after this line is not processed.
The dbPath always seems to be returned as '/progress.db' which seems wrong to me.
Whats the best way to get this working on android???
Thanks
Andy