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
Regular Contributor
ingybing
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified
Accepted Solution

Corrupt HTML5 Database

Hi,

 

I have a device which has appears to have a corrupted databse HTML5 database, does anyone know how to locate this on the device and delete / reset the whole application storage area without having to reset the whole phone.

 

Regards,

 

Dave

Developer
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: Corrupt HTML5 Database

Your DB will be located here:

 

[SDCardDir]/BlackBerry/system/appdata/rim/webstorage/[appName]

 

appName may be base64(appName) if you're using OS5. Delete the whole folder manually using Windows explorer if you can access it with the BlackBerry plugged in.

 

From within the app, "DROP TABLE.." would normally remove it, but doesn't help if you can't open because it was corrupted. Here you can use  blackberry.io.dir.exists() to make sure the directory actually exists, then use  blackberry.io.dir.deleteDirectory([path])where path == file:///SDCard/BlackBerry/System...

Regular Contributor
ingybing
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: Corrupt HTML5 Database

Cheers mate ;o) Found it.. on mine it was in the device memory not sd but jobs a good'en.....

Has to be said it's not good that it can be allowed to get into a state that the openDatabase call fails....
Developer
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: Corrupt HTML5 Database

Tell me about it. Happened to me a few times which is why I know where to locate the db. Search my previous posts for various complainings on the subject. Glad you got it sorted!