On Mon, Jul 22, 2013 at 10:19 AM, Nelson, Erik - 2 <
erik.l.nel...@bankofamerica.com> wrote:

> I've got an application that allows the user to create an arbitrary number
> of databases, either in memory or not.  In my C++ program, I have the
> handles and I'd like to attach them all together so the user can execute
> queries against them.  However, the only way that I've found to do that is
> to use the "ATTACH" sql.  The problem is that the sqlite3* exist, but the
> databases aren't in any namespace accessible to the "ATTACH" query.
>
> Is there some way to programmatically attach databases when all you have
> are the sqlite3 handles?
>

No.  The only way to ATTACH a database is via the ATTACH command, which
will invoke the xOpen method of the VFS to open the file.  If the file is
no longer accessible, then it cannot be attached.  There is no way to
transfer an open file from one database connection to another.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to