Thread: begin-end?

begin-end?

From
Joep deVocht
Date:
Hi,

I've been reading the documentation but I need to be sure I
understand correctly and am doing the right thing.
Do I use "begin" and "end" if I want to lock the database
so no user can do a transaction and mess up what I'm doing?
(i.e. make the transactions between "begin" and "end" atomic to the
other dbase users?)

Thanx in advance,

Joep.

Re: begin-end?

From
Doug McNaught
Date:
Joep deVocht <joep@masktools.com> writes:

> Hi,
>
> I've been reading the documentation but I need to be sure I
> understand correctly and am doing the right thing.
> Do I use "begin" and "end" if I want to lock the database
> so no user can do a transaction and mess up what I'm doing?
> (i.e. make the transactions between "begin" and "end" atomic to the
> other dbase users?)

Basically yes, but the transaction doesn't "lock" the database; the
other users just don't see the effects until you call "commit" (not
"end").  You can also call "rollback" instead of "commit" and it will
undo everything you did since the last "begin".

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863