On 20 Jul 2010, at 2:01am, Sam Carleton wrote:

> On Mon, Jul 19, 2010 at 3:51 PM, Simon Slavin <slav...@bigfraud.org> wrote:
> 
>> You know, I think that the most efficient way to do what you want will
>> probably to always issue the 'ATTACH' command.  If EventsDB is already
>> attached, you should get a specific error code, which you can notice but
>> ignore.
> 
> So, there is foul simply trying to attach and ignoring the error if there is
> one?  That does sound ideal.

Test it.  Try it and see what happens.  Ideally either you'll get a SQLITE_ 
error code, or the second attach will be silently dropped.  But it's possible 
that the PRAGMA will show you've found a bug in SQLite in which case please 
post here.

If you get an error code, ignore that specific one only, and not all errors 
returned by the ATTACH.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to