Subject Re: [firebird-support] Transaction
Author Marcello Fontolan
Philip, I know that this group is not about Delphi (or any other
language) but I'm not sure about what is causing the error.
I have a grid with a datasource linked (IBDataset) and this dataset is
linked with another datasource (other IBDataset).
The user can insert, edit and delete records at this grid.
Acctualy, when it's insert, everything is ok but the edit and delete
does not applys to the table. The grid shows the changes (edit or
delete) but the table are saved with only the insert. If I insert many
records and delete then, they will all be saved. I use a IBQuery to get
the sum of all this values and the query returns the sum with all
records, including the deletes.
Thanks for the help!

..::
Marcello Fontolan
marcello@...
::..



unordained wrote:

> Note: I'm assuming you mean "database table" and not, say "grid" or
> "list" or other visual
> component on your forms. If you meant only visual components, then
> there are two issues:
>
> a) if a limitation exists, it's likely the fault of the visual
> components you're using, not the
> server
> b) several visual components on a form should probably pull data from
> the same transaction, as the
> user likely expects data on a form to "go together" consistenly (if
> the same data is shown twice on
> the form, you should probably never see two different versions of the
> data on the same form.)
>
> Otherwise ...
>
> A transaction can (and should) do as much work for you as you need. It
> may retrieve all the data
> from a table, then be asked to make changes to that data, as is likely
> the case for you. It might
> do more than that.
>
> I very often have one transaction per form, because each form is
> performing a given task which I
> want to be able to "undo" as a whole. If a user is entering a new bill
> in the accounting system,
> then I have on transaction that will be a context for inserting the
> bill, the payments, and
> everything else. It spans multiple tables, but it spans exactly one
> action. If I'm running a
> report, I have one transaction, pulling data from several tables at
> once. It's one action.
>
> There is no problem with having a transaction touching several (all)
> of your tables at the same
> time. You should decide how to use your transactions based on:
>
> - how many things you want to commit/rollback together as a single action
> - how many things depend on seeing a single "consistent" view of the
> database
>
> All parts of a given report, for example, should be looking at the
> same data, or you'll have
> problems. All forms that perform an action should be able to undo all
> of the changes, and not just
> some of them, if something goes wrong or the user cancels (unless you
> mean for it to leave a trace.)
>
> -Philip
>
> ---------- Original Message -----------
> From: Marcello Fontolan <fontolan@...>
> > Hello,
> >
> > There is any problem open a table that uses a transaction that is
> > already active and is already used by another tables?
> > What is the most used, a transaction to each table?
> > I used to use one transaction for each form but now I does not
> know if
> > it is correctly.
> >
> > Thank you all!
> ------- End of Original Message -------
>
>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> <http://rd.yahoo.com/SIG=12c7nsmhu/M=268585.4521611.5694062.1261774/D=egroupweb/S=1705115386:HM/EXP=1079493822/A=1950447/R=0/SIG=1245hvqf1/*http://ashnin.com/clk/muryutaitakenattogyo?YH=4521611&yhad=1950447>
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
> * To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
> <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> .