Sorry, not all connections. Just attached dbs. I am still new and learning about dbs, so...


----- Original Message ----- From: "Igor Tandetnik" <[EMAIL PROTECTED]>
To: "SQLite" <sqlite-users@sqlite.org>
Sent: Sunday, March 11, 2007 12:35 AM
Subject: [sqlite] Re: Re: Re: How do I know what DBs I have attached?


jose isaias cabrera <[EMAIL PROTECTED]>
wrote:
jose isaias cabrera
<[EMAIL PROTECTED]>
wrote:
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.

You don't want an otherwise read-only connection have to write to the
database. This will harm concurrency.

Oh, I agree.

I'm confused. Didn't you just say that it would be a good idea for every connection to be recorded in some table in the database? Wouldn't that require every connection to write to the database as part of opening or attaching?

The reason why I want to do it, is to not attach, if
there one attached, already. For the exact reason that you point out. Since I have a few users that will update this DB at any moment, meaning that could do it at the same time, I want to have a catch for that problem.

As soon as you try to update, if another update is already in progress, you'll get an error from SQLite. Wouldn't that be sufficient to "catch the problem"?

Let us say that I have a few users that would connect to this DB to
update it at any moment. Say user one connects to do an update to his
data.  At millisecond later, user2 connects to do an update to his
data, and here is the question, can user say say something like,

UPDATE TAble .... after database is not busy.

Not quite, but you can retry again some time later. See also sqlite3_busy_handler, sqlite3_busy_timeout.



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

Reply via email to