On 19 Jul 2010, at 8:11pm, Sam Carleton wrote:

> In my case, new or old is of little concern except for the fact that
> the old connection will be attached to the second DB, the new one will
> not.  So, this is why, upon getting the connection from the APR DBD,
> there is a check to see if the second DB is attached yet or not.

Thank you for your explanation of how the Apache Portable Runtime (APR) DBD 
system works.  Now I understand.

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.

I assume that you do have a good reason to want to keep data in the separate 
EventsDB file rather than the original database file.

On 19 Jul 2010, at 8:14pm, Sam Carleton wrote:

> On the other hand, I do hard code columns, such as the name column is
> 1 and the filepath column is 2 in this case.  I assume that is safe,
> or should I consult the metadata for that, too?

Technically, you can't depend on any PRAGMAs at all: they are not a formal part 
of SQLite:

"Specific pragma statements may be removed and others added in future releases 
of SQLite. There is no guarantee of backwards compatibility."

However, I cannot see the SQLite authors rearranging the existing columns of 
that PRAGMA without a very good reason.  They may, of course, add others onto 
the end.

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

Reply via email to