How to use local database in N9 application
First,please forgive my little english.
I 've met with this problem for a long time.
I am going to develop an application that can search some infomation in my local database.
In my qml file ,i use the following codes to link database. (I mean that my databse is not empty at first,I 've put some data in it ,and i just want to use its data in this application.)
function getDatabase() {
return openDatabaseSync("MyDB", "1.0", "Mine", 5244928);
} //open sqlite databse
function appendListModelData(busNumInput)
{
var db = getDatabase();
menuData.clear(); //clear all the listView element at first
myTrainLine.text=busNumInput;
db.transaction(function(tx) {
var rs = tx.executeSql('SELECT * FROM train');
//* This is part of my codes
In my Qt Simulator,it is ok to lunch the local database
in this directory:"C:\Users\Administrator\AppData\Local\Nokia\QtSimulator\data\QML\OfflineStorage\Databases\"
So i save my databse in here.And i can visit the data in this file easily in my Simulator QT for Visual 2008.
However,when i pack my app to deb package and deploy it to my N9 ,it cant visit the database's data.
So,i want to know ,how should i visit my database in my N9,where it would be in my N9?
And if i want to visit it in my phone,how should i deploy my databse, and in which directory it should be?
Re: How to use local database in N9 application
I have never used sqlite thru qml...I suggest to use backend c++ instead and pack all thru DEPLOYMENTFOLDER.
Re: How to use local database in N9 application
Hi,
Please refer to DataStorage Location in this page.
[url]http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Essential_concepts_for_Harmattan_developers_Data_storage.html[/url]
- Kusuma
Re: How to use local database in N9 application
thank you ,i 've know some better method now ...
TY!