Re: [sqlite] Continuous exclusive lock

2011-07-01 Thread Cecil Westerhof
2011/7/1 Simon Slavin > >> If you _need_ exclusiveaccess all along, then start app, "begin > >> exclusive", do your stuf, "commit" and exit. > > > > The 'problem' is that the application can run for the whole day. > > There's no problem with this. You can maintain an

Re: [sqlite] Continuous exclusive lock

2011-07-01 Thread Simon Slavin
On 1 Jul 2011, at 3:51am, Cecil Westerhof wrote: > 2011/6/30 Jean-Christophe Deschamps > >> If you _need_ exclusiveaccess all along, then start app, "begin >> exclusive", do your stuf, "commit" and exit. > > The 'problem' is that the application can run for the whole day.

Re: [sqlite] Continuous exclusive lock

2011-07-01 Thread Cecil Westerhof
2011/7/1 Jean-Christophe Deschamps > > > > If you _need_ exclusiveaccess all along, then start app, "begin > > > exclusive", do your stuf, "commit" and exit. > > > > > > >The 'problem' is that the application can run for the whole day. > > Granted. And the 'problem' is ??? >

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Jean-Christophe Deschamps
> > If you _need_ exclusiveaccess all along, then start app, "begin > > exclusive", do your stuf, "commit" and exit. > > > >The 'problem' is that the application can run for the whole day. Granted. And the 'problem' is ??? > > What I don't get is you later say it's a single-user, single-app > >

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Cecil Westerhof
2011/6/30 Jean-Christophe Deschamps > If you _need_ exclusiveaccess all along, then start app, "begin > exclusive", do your stuf, "commit" and exit. > The 'problem' is that the application can run for the whole day. > What I don't get is you later say it's a single-user,

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Jean-Christophe Deschamps
Cecil, >Do I understand it correctly that after a commit the database is writeable >again for others? Yes. > In that case it is maybe better to do a: > *PRAGMA locking_mode = EXCLUSIVE; >*followed by an update of the database. As long as the application is >running, I want to be sure that

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Cecil Westerhof
2011/6/30 Simon Slavin > > On 30 Jun 2011, at 6:34pm, Cecil Westerhof wrote: > > > It is a single user application and database. > > Sorry about that, Cecil. I was remembering some of the bonehead manoeuvres > some of my former clients have pulled, then complained about. >

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Simon Slavin
On 30 Jun 2011, at 6:34pm, Cecil Westerhof wrote: > It is a single user application and database. Sorry about that, Cecil. I was remembering some of the bonehead manoeuvres some of my former clients have pulled, then complained about. Simon. ___

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Cecil Westerhof
2011/6/30 Simon Slavin > > As long as the application is > > running, I want to be sure that nobody writes to the database. > > This may be sensible if the application never waits for any input. Some > sort of bulk-update application, for example, or an overnight batch

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Simon Slavin
On 30 Jun 2011, at 6:16pm, Cecil Westerhof wrote: > As long as the application is > running, I want to be sure that nobody writes to the database. This may be sensible if the application never waits for any input. Some sort of bulk-update application, for example, or an overnight batch run.

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Cecil Westerhof
2011/6/30 Jean-Christophe Deschamps > >Is good enough for me. My only problem is that between reading the > >data and > >writing the changes, I want to be sure that no one has changed the data. > >For me that is enough. > > For this, a simple "Begin immediate;" ...

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Jean-Christophe Deschamps
Cecil, >Is good enough for me. My only problem is that between reading the >data and >writing the changes, I want to be sure that no one has changed the data. >For me that is enough. For this, a simple "Begin immediate;" ... "Commit;" embrassing you read-modify-write block will do. Doesn't

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Cecil Westerhof
2011/6/30 Richard Hipp > > > I am writing a desktop application in which I want to have exclusive > > rights. > > > In this way I do not need to check if the data has changed when the > user > > of > > > my program wants to change records. Is this possible? > > > > You can open

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Richard Hipp
On Thu, Jun 30, 2011 at 8:59 AM, Simon Slavin wrote: > > On 30 Jun 2011, at 1:48pm, Cecil Westerhof wrote: > > > I am writing a desktop application in which I want to have exclusive > rights. > > In this way I do not need to check if the data has changed when the user > of

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Simon Slavin
On 30 Jun 2011, at 1:48pm, Cecil Westerhof wrote: > I am writing a desktop application in which I want to have exclusive rights. > In this way I do not need to check if the data has changed when the user of > my program wants to change records. Is this possible? You can open a transaction as

[sqlite] Continuous exclusive lock

2011-06-30 Thread Cecil Westerhof
I am writing a desktop application in which I want to have exclusive rights. In this way I do not need to check if the data has changed when the user of my program wants to change records. Is this possible? -- Cecil Westerhof ___ sqlite-users mailing