Subject Re: Explicit table lock
Author Ed Dressel
--- In firebird-support@yahoogroups.com,
franciscojose.ruedacastanon@t... wrote:
> Let me explain what I'm trying to achieve; I'm new to
Firebird and
> I've not very clear this point.
>
> I have several tables that gather information from the main
tables of
> database when a report is launched. In this process, first all the
records
> are deleted, then the new ones are inserted and finally several
fields are
> updated from other tables. Each of these actions is performed
inside a
> transaction (so, there are three transactions). My doubt is: if
during this
> whole process another user launches the same report with other
parameters,
> what will be the final state of the table? Maybe there will be
a "mix" of
> records of the several requests? So the idea is to isolate the whole
> process of generating the report when the first user launches it
and to
> "lock" the other users while the process is running.

change it to perform all writes/reads inside of one transaction. This
will allow the report to view only the information inside of the
transaction--any other reports will not have access ot the data until
the transaction is committed (before which point, as suggested
elsewhere, delete the data).

Ed Dressel