Subject Re: [IBO] Problem with IBO and CachedUpdates - Jason
Author Paulo Henrique Albanez
----- Original Message -----
From: "Paulo Henrique Albanez" <pha@...>
To: <IBObjects@egroups.com>
Sent: Wednesday, April 10, 2002 2:02 PM
Subject: Re: [IBO] Problem with IBO and CachedUpdates - Jason


> I managed to understand the Fontes, of the way how was done IBO always
will
> do ApplyUpdates in the order inverse.
>
> Jason I can solve this problem, only that there is 2 forms (at least) of
> solve them:
>
> 1) Changing in the unit IB_Session
>
> Of:
> TIB_NodeIndexItem = record
> Next: PIB_NodeIndexItem;
> Node: PIB_Node;
> end;
>
> For:
>
> TIB_NodeIndexItem = record
> Prev: PIB_NodeIndexItem;
> Next: PIB_NodeIndexItem;
> Node: PIB_Node;
> end;
>
> And doing the necessary alterations in unit IB_NodeList.
>
> 2) Changing in the unit IB_NodeList for procedure
> TIB_NodeList.ProcessUpdates.
>
> When AProcess = cupApply:
> - prosecute in the order inverse
> - store all the Nodes
> - prosecute in the order correct
>
> Please of one examined in the fontes and tell me what you find.
>
> PHA
> Nova Odessa / SP - Brazil
>
> ----- Original Message -----
> From: "Paulo Henrique Albanez" <pha@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Wednesday, March 27, 2002 2:24 PM
> Subject: Re: [IBO] Problem with IBO and CachedUpdates
>
>
> > > When you ApplyUpdates, IBO goes through the cache starting at row 1,
> until
> > > it finds the first inserted row - that is new row 3!
> >
> > Helen, only that IBO is not working this way.
> >
> > Original dataset:
> >
> > row 1 <--- cursor is here
> > row 2
> > row 3
> > row 4
> >
> > Update rows 1, 2 and 3:
> >
> > Updated row 1
> > Updated row 2
> > Updated row 3
> > row 4 <--- cursor is here
> >
> > Move the cursor to row 1:
> >
> > Updated row 1 <--- cursor is here
> > Updated row 2
> > Updated row 3
> > row 4
> >
> > Run ApplyUpdates:
> >
> >
> > IBO update row 3
> > IBO update row 2
> > IBO update row 1
> >
> > Affert ApplyUpdates.
> >
> > row 1 <--- cursor is here
> > row 2
> > row 3
> > row 4
> >
> > > Why is it a problem?
> >
> > That it can cause several problem, mostly if the application demand an
> order
> > in updates/Insets, also is confused for the user.
> >
> > PHA
> > Nova Odessa / SP - Brazil
> >
> > ----- Original Message -----
> > From: "Helen Borrie" <helebor@...>
> > To: <IBObjects@yahoogroups.com>
> > Sent: Wednesday, March 27, 2002 11:31 AM
> > Subject: Re: [IBO] Problem with IBO and CachedUpdates
> >
> >
> > > At 10:59 AM 27-03-02 -0300, you wrote:
> > > >When I change or I insert some records, and I run AppyUpdates, IBO
> > records
> > > >register them in the order inverse.
> > > >
> > > >Example:
> > > >
> > > >I insert record 1
> > > >I insert record 2
> > > >I insert record 3
> > > >
> > > >I run ApplyUpdates.
> > > >
> > > >IBO inserts record 3
> > > >IBO inserts record 2
> > > >IBO inserts record 1
> > > >
> > > >Because that?
> > >
> > >
> > > Original dataset:
> > >
> > > row 1
> > > row 2
> > > row 3 <--- cursor is here
> > > row 4
> > >
> > > Insert a row:
> > >
> > > row 1
> > > row 2
> > > new row 1 <---- cursor is here
> > > row 3
> > > row 4
> > >
> > > Insert another row:
> > > row 1
> > > row 2
> > > new row 2 <--- cursor is here
> > > new row 1
> > > row 3
> > > row 4
> > >
> > > Insert another row:
> > >
> > > row 1
> > > row 2
> > > new row 3 <--- cursor is here
> > > new row 2
> > > new row 1
> > > row 3
> > > row 4
> > >
> > > When you ApplyUpdates, IBO goes through the cache starting at row 1,
> until
> > > it finds the first inserted row - that is new row 3!
> > >
> > > >How to solve? Already I looked the fontes more I did not manage to
> solve
> > the
> > > >problem.
> > >
> > > Why is it a problem?
> > >
> > > You could use Append...
> > > Original dataset:
> > >
> > > row 1
> > > row 2
> > > row 3 <--- cursor is here
> > > row 4
> > >
> > > Append a row:
> > >
> > > row 1
> > > row 2
> > > row 3
> > > row 4
> > > new row 1 <---- cursor is here
> > >
> > > Append another row:
> > > row 1
> > > row 2
> > > row 3
> > > row 4
> > > new row 1
> > > new row 2 <--- cursor is here
> > > ..and so on
> > >
> > > cheers,
> > > Helen
> > >
> > > All for Open and Open for All
> > > Firebird Open SQL Database · http://firebirdsql.org ·
> > > http://users.tpg.com.au/helebor/
> > > _______________________________________________________
> > >
> > >
> > > ------------------------ Yahoo! Groups
> > >
> > >
> >
>
___________________________________________________________________________
> > > IB Objects - direct, complete, custom connectivity to Firebird or
> > InterBase
> > > without the need for BDE, ODBC or any other layer.
> > >
> >
>
___________________________________________________________________________
> > > http://www.ibobjects.com - your IBO community resource for Tech Info
> > papers,
> > > keyword-searchable FAQ, community code contributions and more !
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> > >
> >
>