Dear Richard,

  This is great api.

  output:

  (1) statement aborts at 5: [DETACH my_in_memory_db;] database
my_in_memory_db is locked
  (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 <[email protected]> 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 <[email protected]> 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
> > [email protected]
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
>
> --
> D. Richard Hipp
> [email protected]
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to