Wow!  Tough guy. :-o

----- Original Message ----- From: "John Stanton" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Sunday, March 11, 2007 1:00 PM
Subject: Re: [sqlite] Re: How do I know what DBs I have attached?


Sqlite is a library used to realize an embedded RDBMS. Nowhere does it claim to be a nanny.

jose isaias cabrera wrote:
"Igor Tandetnik" wrote,


jose isaias cabrera <[EMAIL PROTECTED]>
wrote:

What
I would like to know is, how do I know if I have a db attached already?


Realize that a set of attached DBs is a property of a connection (a sqlite3* handle), not some kind of persistent state of the database. You seem to be under impression that when two processes open the same DB file, and one process attaches another DB file, the other process can somehow query SQLite and find out that this happened. This is not the case.


Perhaps, this should be the case. It would not be so hard to keep a table
of connections that are attached or open with a table.


So, if you want to know if _you_ have attached a DB, just keep track of ATTACH DATABASE commands you have issued on your connection. If you want to know if someone else attached a DB to one you also happen to have open, SQLite can't help you there.


Perhaps it should.

Also, can different clients ATTACH to the same DB and REPLACE unique
RECORDS without any problem?


Well, only one connection can modify a particular database file at the same time. It doesn't matter if you open the file directly, or attach it to an existing connection. If two processes attempt the modifying operation at the same time, one of them will proceed and the other will be locked out.


Is there a way of telling the DB to UPDATE records after the actual
connection has completed its processing?  Something like UPDATE queue?


-----------------------------------------------------------------------------

To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to