Re: [sqlite] Question about having 2 db connections on same

2011-02-14 Thread Jeff Archer
Date: Sun, 13 Feb 2011 22:14:29 -0500 From: Pavel Ivanov paiva...@gmail.com I do a transaction on connection 1 using BEGIN IMMEDIATE, some rows updated, COMMIT. Then, when I attempt same sequence on connection 2, when I do first call to step to execute begin transaction and it never returns.

[sqlite] Question about having 2 db connections on same thread

2011-02-13 Thread jeff archer
I thought this would be OK but now that I am seeing it fail I am having my doubts.  I have created 2 db connections on the same thread, both on the same file.  i.e. 2 calls to sqlite3_open16() (use exact same filename both times) have created 2 sqlite3 instances.  I do this because I have 2

Re: [sqlite] Question about having 2 db connections on same thread

2011-02-13 Thread Vannus
Are you not able to use the same db connection in both classes? something like FirstTablesClass-dbConnection = MyDBConnectionClass SecondTablesClass-dbConnection = MyDBConnectionClass On 13 February 2011 23:04, jeff archer jarch...@yahoo.com wrote: I thought this would be OK but now that I am

Re: [sqlite] Question about having 2 db connections on same thread

2011-02-13 Thread Simon Slavin
On 14 Feb 2011, at 12:30am, Vannus wrote: Are you not able to use the same db connection in both classes? something like FirstTablesClass-dbConnection = MyDBConnectionClass SecondTablesClass-dbConnection = MyDBConnectionClass Nevertheless, having two connections should work too. His

Re: [sqlite] Question about having 2 db connections on same thread

2011-02-13 Thread Pavel Ivanov
I do a transaction on connection 1 using BEGIN IMMEDIATE, some rows updated, COMMIT. Then, when I attempt same sequence on connection 2, when I do first call to step to execute begin transaction and it never returns. Do you check result code from COMMIT and is it successful? My guess is you