언어 설정

Menu
Sites
Language
How to get my local database with openDatabase()

Hi,everyone

I have a big trouble now!

I‘m developing a web application for tizen and I have my own database named "citylist.db",

now I want to install citylist.db to tizen with my web app installing,

then use openDatabase() function to get it,

I know the first parameter of the openDatabase() function is database name, like

openDatabase("citylist", '1.0', 'city list', 8*1024*1024);

but when I use "citylist" or "citylist.db",it doesn't work,it can't find the db,and it creates

a new blank db as the same name with my db "citylist.db",

But how can I read my own citylist.db ,how can I make openDatabase() know that

citylist db is exist?

Any answer is welcome! Thx!

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

7 댓글
Raghavendra Reddy Shiva
Hello wu tattoo, Yes, as you mentioned the first parameter is DOMString name, so either the database name should be provided which is already created by the application or new database can be opened using this API. Will verify and get back to you , if there is a possibility to push the external database file to the database file location on the device and can be accessed or opened from there or not. Thanks
tattoo wu
Thanks for your reply. I think there are two steps to resolve the problem. One is that how the openDatabase() function judges DOMString name given exist or not, for example ,it judges "/home/usr/xxx/xxx/citylist.db" ,if exist,open it ,else create new db named "citylist.db", and then ,I should install citylist.db to "/home/usr/xxx/xxx/..." when installing my web app,so openDatabase() could read my own db after that. So I want to know if possibility to do how openDatabase() judges DOMString name and how can I install my own db to specified path for openDatabase() reading or not!
Lakshmi Grandhi
Hi, Application specific database will be created inside /opt/apps/appname/data/.webkit/databases
Lakshmi Grandhi
Hi, Application specific database will be created inside /opt/apps/appname/data/.webkit/databases
Yunchan Cho
I know that webapp's webkit data including localstorage are created inside /opt/usr/apps/[package name]/data/.webkit/ After creating a localstorage from your web app, you can see specific database file for that. Best Regards, Yunchan Cho.
Jenny Blossoms

 

Where is the database location in Tizen IDE and device ?

I couldn't find the package name and data,.webkit...

Please let me know

Lakshmi Grandhi

you need to login using sdb shell and run as super user then search in "/opts/apps/xxx/" folder