Subject Re: [IBO] RE: help
Author lester@lsces.co.uk
> Thanks for your input. Actually, the transactions are handling separate
> records. And, I am in a way trying to nest the transactions, but maybe not
> in the way you have perceived. Let me detail what I am doing a little
> further and maybe you can tell me the best way to cancel/delete the DETAIL
> record...

Call StartTransaction here

> Append Invoice Query ... Invoice #15001 {Start a new Invoice - MASTER}
>
> Append Item Query ... Item #1001 {Add a new Line Item to the Invoice -
> DETAIL}
> Append Item Query ... Item #1002 {Add a new Line Item to the Invoice -
> DETAIL}
> Append Item Query ... Item #1003 {Add a new Line Item to the Invoice -
> DETAIL}
> Append Item Query ... Item #1004 {Add a new Line Item to the Invoice -
> DETAIL}
>
> Example: Before Applying the Updates (Query.ApplyUpdates) I noticed that I
> made a mistake and need to cancel Item #1004 before I complete it. Right now
> I am calling DETAIL.CancelUpdates to handle this, but when I commit the
> transaction it still saves Item #1004.

I just use delete - it works within the transaction you are
working on.
I don't use 'Updates', I just append a new record to DETAIL
and modify it directly, or delete it.

> Also, let's say I want to Delete Item #1002. What should I call so that when
> I commit the transaction this is not recorded?

Same again, also making any modifications.

> The reason I am not committing each DETAIL Item, is because I need the
> flexibility of rolling them back in case the user decides to Cancel the
> Invoice (MASTER).

I have a Commit and Abort(Rollback) button, which then close
the Transaction, once you are happy with the detail.

> Can you let me know what to call to cancel a current append and delete an
> existing item ... both members of the Item Query (DETAIL)?

I have a grid displaying the detail records, with an <Add>
and <Delete> button from the IBUpdateBar, all the records
are visible, so you just select the one to delete.

This set of records is simply not available to other users
until it has been committed to the database.

As Jason suggested, you may be making things more complex
than you actually need. IBO 'hides' a lot of the things that
in BDE you must do explicitly. Just try simplifying what you
have already - I hope that you will be surprised by the
results.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services