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

Web and WebWorks Development

Reply
Highlighted
Developer
Posts: 34
Registered: ‎07-14-2011
My Device: BlackBerry Curve 9300
My Carrier: Orange

DatabaseException on BlackBerry Device: Cannot determine path to local storage

[ Edited ]

Hello I'm testing a webworks application on the following devices:

 

BlackBerry Bold 9700 With BlackBerry OS 5

BlackBerry Curve 9300 With BlackBerry OS 5

 

Both devices has an SDCard of 2GB.

 

When I try to create or open a database the webworks api throws this Exception on both devices:

 

net.rim.device.api.Database.DatabaseException: Cannot determine path to local storage

 

Here is the code I use to initialize the database

 

ICS.LoginConfig = { 
dbName : 'tuc',
dbInsertUserQuery : 'insert into userinfo(cedula,passwd) values (?,?)'
}

initializeDb : function(callback){

try {
this._db = google.gears.factory.create('beta.database');
alert(this._db);
if(this._db === undefined){
return false;
}

this._db.open(ICS.LoginConfig.dbName);
this._db.execute(ICS.LoginConfig.dbLoginTable);
}catch(e){
alert(e);
return false;
}

return true;
}

 

The exception is thrown at the moment of call the open method of the "_db" object.

 

In the simulator everything goes well.

 

Thank for your help

Developer
Posts: 34
Registered: ‎07-14-2011
My Device: BlackBerry Curve 9300
My Carrier: Orange

Re: DatabaseException on BlackBerry Device: Cannot determine path to local storage

Hi

I've resolved my issue, I only forgot to disconnect the devices of the computer and therefore the sdcard was locked.

Novice errors. Sorry Smiley Happy