Subject | Re: [IBO] Re: Seeing deleted records with CachedUpdates |
---|---|
Author | Jason Wharton |
Post date | 2001-05-09T04:39:18Z |
Are you using triggers to do any of this?
If not, I suspect there could be some vulnerabilities in your system.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
If not, I suspect there could be some vulnerabilities in your system.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "fxam" <fxam@...>
To: "IBObjects" <IBObjects@yahoogroups.com>
Sent: Tuesday, May 08, 2001 8:36 PM
Subject: [IBO] Re: Seeing deleted records with CachedUpdates
> > Seems to me that you should be determining the balance based on adding
up
> > the non-deleted records. Are you trying to mix server derived values
with
> > the cached updates impacted values?
> > Jason
>
> I don't know exactly what you mean. So I'll show my example.
> I have two tables, the master is ItemTr, the children is ItemTrDet.
> There is one field in ItemTr: ID
> There are three fields in ItemTrDet: ItemTr_ID, Item_ID and Qty.
>
> A third table called Balance keeps the item balances. It has two fields:
> Item_ID and Balance.
>
> 1. Let's say initially the balance records are as below:
> Item_ID Balance
> ======= =======
> 1 100
> 2 100
> 2. I insert a record in ItemTr (ID=1)
> 3. I insert two records in ItemTrDet which point to record in #1:
> ItemTr_ID Item_ID Qty
> ========= ======= ===
> 1 1 10
> 1 2 20
> 4. When I post ItemTr, the program should reduce the corresponding record
> in the Balance table. So the Balance table should be updated as below:
> Item_ID Balance
> ======= =======
> 1 90
> 2 80
> 5. At a later time, I delete the first ItemTrDet record, thus the Balance
> table should become as below:
> Item_ID Balance
> ======= =======
> 1 100
> 2 80
>
> What I do is enabling CachedUpdates for ItemTr and ItemTrDet,
> and in AfterPost event of ItemTr, I want to walk through what the user
> has done to ItemTrDet, so that I can update the balance. If the user
> has deleted something, I must add the qty back to update the balance.
>
> Thanks =)
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>