--- Philip <[EMAIL PROTECTED]> wrote:
> G'day, I'm using 0.36 nested, and am having a locking problem. It
> seems that after doing an executeUpdate() call from a
> PreparedStatement, the db gets locked and I can't do any queries on
> the db from any other connections. A -journal file is created while
> this is the case. My java app seems to run fine though, it can keep
> doing queries/updates.
Your last sentence contradicts an earlier sentence.
Which connections can keep doing queries and which ones cannot?
The existance of a journal file suggests that you have an uncommitted
transaction in one of your connections/threads.
> If I shutdown my java app, I can then use sqlite3 command line to do a
> query, this works, and the -journal file goes away.
>
> My prepared statement is pretty simple, I do something like:
>
> PreparedStatement stat = conn.prepareStatement("UPDATE foo SET bar = ?
> WHERE id = ?");
> stat.setLong(1, new Date().getTime() / 1000);
> stat.setInt(2, 1);
> stat.executeUpdate();
> stat.close();
>
> I do Connection conn =
> DriverManager.getConnection("jdbc:sqlite:filename"); once at startup,
> and use conn throughout my entire app.
>
> Any ideas why this might be happening?
If you supply a small complete java program that demonstrates the problem,
I'm sure someone will be able to offer a suggestion.
Many problems are not related to what people think is broken.
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---