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

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*
> <*>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
> * To visit your group on the web, go to:
> * To unsubscribe from this group, send an email to:
> <>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <>.
> .