John Belli <[EMAIL PROTECTED]> writes: > > On Thu, 16 Oct 2008 17:54:52 +0000 (UTC), MikeW > <[EMAIL PROTECTED]> wrote: > > >My code has two pre-opened DB connection handles, and would like to > >perform an SQL operation over the two databases. > >The DB filenames are not available at this point, hence an ATTACH is > >not feasible. > >Is there any way to achieve this by applying an ATTACH at the handle level ? > > I don't think so, but check into "PRAGMA database_list" (See > http://www.sqlite.org/pragma.html ). > > JAB
Thanks, that might be useful in some situations but not in this one. The use case is a very specific one in which a database may contain one-off overrides for a second, normally independent (but already opened) database. I can obviously implement this by reading rows from the first one and updating the second, but if I could briefly refer to both DBs at the same time, it would be just one 'atomic' SQL statement - much simpler and more robust. Still, it seems surprising that there isn't a (SQLite-specific) handle-level operation to do this attach, maybe I should put in a feature request. (Or even have a look in the SQLite code to see if it's an easy mod ...) MikeW _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users