Thanks for your reply, James! > Parameterized queries in general let you replace any data value > (and not metadata). For instance, you can replace a column value, but > not a column name. Using that as a guide, I'm a little suprised that > > ATTACH DATABASE ? AS ? > > works, because the second parameter is metadata.
To be honest, by 'works' I currently mean "The statement prepares alright, I can bind both parameters and execute it without ever being presented with anything but SQLITE_OK or SQLITE_DONE". I have not actually yet checked if the database was attached using the bound name, so it might just have been attached with a name of '?'. I'll check ASAP. As for my second question (Attaching the same file multiple times under different names), I found the answer in the documentation for the DETACH statement[0]. It might be useful to also include that fact in the ATTACH documentation :) Thanks for your time! [0] https://www.sqlite.org/lang_detach.html -- FJS