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

Java Development

Reply
New Contributor
bitlitter
Posts: 3
Registered: ‎09-19-2011
My Device: Torch 9810
My Carrier: Rogers
Accepted Solution

DatabaseIOException - Encryption settings have changed

[ Edited ]

Hi,

 

I'm new to BB dev and I ran into an issue I can't seem to resolve.  I've tested my code/app on Simulators 9780 and 9800 with OS6 as well as the actual devices.  They work fine.  The app uses SQLite database and is stored on SDCard with encrption on the database file.

 

My issue is with the newew Torch 9810 with OS7 (simulator and actual device) upon first use of the application runs fine, BUT after exiting and going back into the App, I get a DatabaseIOException error - "Uncaught Exception: Encrption settings have changed".  I'm stuck and cannot find a solution....

 

Anyone know what's going on and/or have a solution?  My database encrption method is similar to the SQLite demo.

 

Thanks in advance.

 

Please use plain text.
New Contributor
bitlitter
Posts: 3
Registered: ‎09-19-2011
My Device: Torch 9810
My Carrier: Rogers

Re: DatabaseIOException - Encryption settings have changed

[ Edited ]

Any suggestions???

 

EDIT: Just tried the SQLiteDemo app and same thing happens.  FIrst run OK... following run DatabaseIOException occurs on OS7 devices.

 

 

 EDIT2: Has the behaviour of this line changed for OS 7.... 

 

Database db = DatabaseFactory.openOrCreate(uri, new DatabaseSecurityOptions(false)); 

 

Please use plain text.
New Contributor
bitlitter
Posts: 3
Registered: ‎09-19-2011
My Device: Torch 9810
My Carrier: Rogers

Re: DatabaseIOException - Encryption settings have changed

[ Edited ]

I found a solution that works for me.... instead of using DatabaseFactory.openOrCreate method I've used them separately by first checking if database exists

 

Database db;

if (!DatabaseFactory.exists(uri)) {
    db = DatabaseFactory.create(uri, new DatabaseSecurityOptions( false));
} else {
    db = DatabaseFactory.open(uri);
}

 

 

Please use plain text.