How can I set the locking status of my SQLite database using java?
-
I want to create a SQLite DB using the jdbc driver sqlitejdbc-v056.jar. When I try to run the create query of a table, it returns me the error: java.sql.SQLException: database is locked. SQLite has five locking states: Unlocked, Shared, Reserved, Pending and Exclusive. I need an Exclusive locking state to create my tables.
-
Answer:
Default is normal; for exclusive use PRAGMA [db_name.]locking_mode = EXCLUSIVE; The part between [ and ] is optional. See http://www.sqlite.org/pragma.html#pragma_locking_mode
Klaas V Innocentisart at Quora Visit the source
Related Q & A:
- How can I retrieve the object properties values from the database?Best solution by Stack Overflow
- How can I communicate Raspberry Pi and Arduino (in both ways) using a 10-15m distance wires?Best solution by Arduino
- How can I mount a network drive in Mac OS X in Java?Best solution by Stack Overflow
- How can I find my pnr status?Best solution by Yahoo! Answers
- Where can i set my msn status?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.