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
Regular Contributor
Posts: 92
Registered: ‎07-19-2010
My Device: 8520
Accepted Solution

File system error (12) SQLITE

Ok.. u hav the nexto problem

 

I use sqllite fro my application y make select, insert and updates, all works fine until when i need make updates

 

i need make 20 updates but this update can be made in intervals the 30 to 40 minutes, now i can made the update 1 and 2 but when i go to made the update 3 fail, and show me...

 

net.rim.device.api.database.DatabaseIOException:File system error (12)

 

I put a breakpoint and see what the problem is here..

 

 

URI myURI = URI.create(DB);
d = DatabaseFactory.open(myURI);
Statement st = null;

 

URI myURI = URI.create(DB);

d = DatabaseFactory.open(myURI); // here!!!!! 

 Statement st = null;

 

when i go open the database for made the update.. the curious its what the db already in the SDCARD and ic can make selects and insert before..  omg

Regular Contributor
Posts: 92
Registered: ‎07-19-2010
My Device: 8520

Re: File system error (12) SQLITE

Problem the solved...

 

Its because i have an query bad and when i try to use this update, fail, and for any reason the database can be load again...

 

 

Highlighted
New Contributor
Posts: 2
Registered: ‎08-17-2011
My Device: Curve
My Carrier: Developer

Re: File system error (12) SQLITE

I Have same problem, could you explain how to fix it please..?

 

 

 

many thanks Smiley Happy

New Contributor
Posts: 5
Registered: ‎11-30-2011
My Device: 9700
My Carrier: Developer

Re: Solution File system error (12) SQLITE

[ Edited ]

To open a database, you can use the open method or the openOrCreate method, both in the DatabaseFactory class.

You can open multiple read-only connections to a database, but only one read-write connection can be made at the same time.

If you want to open a database as both read-write and read-only, open it as read-write first. An attempt to open a database as read-write when it is already open (either as read-write or read-only) will generate "File system error 12", which indicates that there was an attempt to open more than one read-write connection to the same database.

To close a database, use the close method. To ensure thatcloseis always called, you should call it in afinally block.