> Example, If I insert 10 records and loop a query I receive
> 10, 10, 10, 10, .... results
> But, if I change one of the records during the loop I get
> 10, 10, update record, 9, 10, ....

This sounds gibberish. Could you please post your database schema and
exact queries you issue in the exact order? And tell us how their
results are different from what you expect.


Pavel


On Mon, Feb 25, 2013 at 1:47 PM, mike.akers <mike.aker...@gmail.com> wrote:
> I am using an in-memory database with a singleton containing a single
> connection. I have multiple threads (3) using this same connection, but I
> have ensured that only 1 thread uses the connection at a time.
>
> If I do an UPDATE on a record then immediately preform a SELECT, the query
> will return all rows that match the WHERE clause except for the record that
> was being updated. The sqlite3_prepare_v2 and sqlite3_step both return
> SQLITE_OK and do not return a SQLITE_LOCKED or SQLITE_BUSY so I would assume
> that my write was completed.
>
> I would like to be able to either
> 1. read the old data (as the quieres happen frequently a couple old data
> queries are fine) I have tried read_uncommited with no noticable difference.
> or 2. Have the database return LOCKED or BUSY if the write has not completed
> so that the query will return all of the results.
>
> Example, If I insert 10 records and loop a query I receive
> 10, 10, 10, 10, .... results
> But, if I change one of the records during the loop I get
> 10, 10, update record, 9, 10, ....
>
> Any advice on what I am missing?
>
> Thanks in advance,
> Mike
>
>
>
> --
> View this message in context: 
> http://sqlite.1065341.n5.nabble.com/Memory-DB-Query-does-not-return-all-records-after-Update-tp67267.html
> Sent from the SQLite mailing list archive at Nabble.com.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to