Given different database name for in-memory database for every iteration(looped for 1000 times). Still, it's throwing Database Locked at least once on Windows, not on Mac/Linux. Is there any way to track this issue? I am using 3.7.11. Any ideas?
On Thu, Apr 17, 2014 at 5:11 PM, Richard Hipp <d...@sqlite.org> wrote: > On Thu, Apr 17, 2014 at 9:08 AM, dd <durga.d...@gmail.com> wrote: > > > Dear Richard, > > > > This is great api. > > > > output: > > > > (1) statement aborts at 5: [DETACH my_in_memory_db;] database > > my_in_memory_db is locked > > > > The DETACH failed because you have unfinalized statements using the > attached database and you cannot detach a database file out from under a > statement that is using that database file. Because the DETACH failed, > subsequent ATTACH statements cannot succeed because there would be a name > conflict. > > > > > (1) statement aborts at 5: [ATTACH DATABASE '/full/path/info.db' AS > > my_in_memory_db;] database my_in_memory_db is > > already in use > > (1) statement aborts at 5: [ATTACH DATABASE '/full/path/info.db' AS > > my_in_memory_db;] database my_in_memory_db is already in use > > (1) statement aborts at 5: [ATTACH DATABASE '/full/path/info.db' AS > > my_in_memory_db;] database my_in_memory_db is already in use > > (1) statement aborts at 5: [ATTACH DATABASE '/full/path/info.db' AS > > my_in_memory_db;] database my_in_memory_db is already in use > > > > there is a detach for every attach. What could be the solution for > this? > > > > Thanks, > > dd > > > > > > > > > > On Thu, Apr 17, 2014 at 2:58 PM, Richard Hipp <d...@sqlite.org> wrote: > > > > > Please turn on error logging (http://www.sqlite.org/errlog.html) and > > > report > > > back what error messages you are seeing. > > > > > > > > > On Thu, Apr 17, 2014 at 6:47 AM, dd <durga.d...@gmail.com> wrote: > > > > > > > Hi All, > > > > > > > > 1. prepare, step, then finalize: Attach DATABASE '/full/path' as > > > > 'my_in_memory_db'; > > > > 2. prepare, step, then finalize: Delete from > my_in_memory_db.table_1 > > > > where primary_key = 'value'; > > > > 3. prepare, step, then finalize: DETACH my_in_memory_db; > > > > > > > > Executed above three queries in loop for 100 times for empty > database > > > > (/full/path). It's throwing sqlite error 1 at some random iteration. > Is > > > it > > > > correct way to implement attach and detach dbs? > > > > > > > > Thanks, > > > > dd. > > > > _______________________________________________ > > > > sqlite-users mailing list > > > > sqlite-users@sqlite.org > > > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > > > > > > > > > > > -- > > > D. Richard Hipp > > > d...@sqlite.org > > > _______________________________________________ > > > 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 > > > > > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > 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