08-02-2010 09:37 AM
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...
I put a breakpoint and see what the problem is here..
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
Solved! Go to Solution.
12-26-2011 11:49 PM - edited 12-27-2011 09:12 PM
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.