Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 188
Registered: ‎01-27-2012
My Device: playbook
My Carrier: ...

Re: QML database problem

Oops, my bad! I assumed that app/native/ was the place to be writing...
I have no real experience with database code, I tried the qml's sqlight data storage and found the performance was terrible. I now just use QSettings for my storage, its performance is instantaneous! :smileyhappy:
For what its worth, QSettings puts the save file in the dir where the application is executing. Here is how that's done from main.cpp:

    //set up settings file in correct path on the particular device
    QString str = app->applicationDirPath(); //returns path of app exe
    settings->setPath(QSettings::NativeFormat, QSettings::UserScope, str);//sets appropriate path for .conf settings file

 That has worked across all platforms for me so far, win, linux, symbian, android, meego and QNX!

Cheers,

Jon

Contributor
Posts: 13
Registered: ‎02-25-2012
My Device: Blackberry Playbook
My Carrier: ...

Re: QML database problem

[ Edited ]

In .cpp file I added code which display content /logs/log, files in /data folder and files i /data/Databases files.

When I run the app first time, I got this:

 

LOG: QBB: failed to open Locale pps, errno=13
Cache hit level 1

/data:
.
..
Settings

Can't open Databases dir

 

Next I initialized findGreetings() function, and I got this: (function stopped in "tx.executeSql('CREATE TABLE IF NOT EXISTS Greeting(salutation TEXT, salutee TEXT)');" line)

 

LOG: QBB: failed to open Locale pps, errno=13
Cache hit level 1

/data:
.
..
Databases
Settings

/data/Databases:
.
..
Databases
Settings
.
..
9f96a41..... .ini

 

 

Contributor
Posts: 13
Registered: ‎02-25-2012
My Device: Blackberry Playbook
My Carrier: ...

Re: QML database problem

Hi,

my problem is finally solved!!

My libqsqlite.so occured defective! After I used another libsqlite.so my application started to work :smileyvery-happy:

 

Thanks very very much for all your help!