语言

Menu
Sites
Language
Share database between two aplications

Hi,

I need to share database file between two applications.

In first app I created database file in the shared path and added some data into tables

Then in second app I successfully read file but when I tried to create statement I get:

 E_OBJECT_LOCKED which means:E_OBJECT_LOCKED    The database instance is locked.

When I tried to use secure database with key I get

E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. [http://tizen.org/feature/database.encryption]

I'm using RD-PQ with Tizen 2.2.1

 

Any ideas how turn on db encryption or how share data between two apps ?

Thanks

Kamil

 

响应

10 回复
Alex Ashirov

Hi,

Which opening mode do you use when open your db file?

Alex Ashirov

Regarding the E_UNSUPPORTED_OPERATION. It seems that you have not added http://tizen.org/feature/database.encryption feature in your manifest.

Kamil N

I couldn't find  http://tizen.org/feature/database.encryption on the features list, was only data.encryption but it didn't work. I used "r" to open.

However I already SOLVED my issue. Previously I put db file in the App::GetInstance()->GetAppSharedPath() + L"data/base.db" and db was locked. Solution was to put file in the App::GetInstance()->GetAppSharedPath() + L"shared/base.db" directory.

Thanks! 

Kamil

 

 

P puvvada

Hai,

When i tried to put db file in App::GetInstance()->GetAppSharedPath() + L"shared/base.db"  iam getting E_file_not found error ,i created a shared folder inside shared folder .

when i tried to put db file file  String dbPath(App::GetInstance()->GetAppSharedPath() +L"data/appiddatabase.db"); data base is created successfully but when i tried to access from seond application iam getting E_Object_Locked error.

Alex Ashirov

Hi,

Please note: "To get this directory path of another application, call the GetAppSharedPath() method of the AppManager class with the specified application ID and use AppManager::GetAppSharedPath() + L"data"." Also, please note that this directory is read only for others.

P puvvada

hai alex,

I already tried like that only but stiil getting same error

 

Alex Ashirov

Hi,

Do you use "r" as opening mode parameter?

P puvvada

I used as r mode in service app  and also i tried with secure database by giving key but getting same error

P puvvada

hai alex

i solved my issue by putting db file in /shared/trusted folder and i can able to acess from other application

Alex Ashirov

Hi,

Good news. Please note that this folder can be shared only between family of trusted applications. So, you can share the database only with applications which are signed with the same certificate.