Subject | Re: [IBO] How to react on a DMLCache-Update |
---|---|
Author | John Peterson |
Post date | 2002-02-24T10:32:39Z |
The mechanics as I understand of process to process DML caching (which Jason
has created the framework for, this stuff is not built into IB)
are.......some steps sure to be missing.
On the server side
1. There are Trigers for Insert, Delete and Update (Created by you) on the
table of interest.
2. These triggers write rows into a table (created by you???). The demo uses
IBO$DML_CACHE. In the row is the Username that wrote it, the Operation
(Insert delete etc), and the Key for the row that has been modified.
3. An event is generated, which is named IBO$DML_CACHE, this could be called
anything you like, however.
At the Client
1. The SyncCursor Component creates a TIB_EVENT, which listens for the
IBO$DML_CACHE event.
2. In the SyncCursor object, it generates a query to retreive the last entry
in the DML_CACHE table, works out if the Username of the Sender is the same
as the Clients Username, if so, it discards the event.
If different, if packages it the columns of the IBO$DML_CACHE query and
calls the IBO$DML_CACHE event handler you have registered in the Grid
component.
If all you are interested in is being notified of a change, you just have to
set up a TIB_EVENT component to listen for the IBO$DML_CACHE event, from
there, you can do what you like..
There is also DMLCACHEing done between components on the same connection,
but that all seems to be internal to IBO and automatic.
has created the framework for, this stuff is not built into IB)
are.......some steps sure to be missing.
On the server side
1. There are Trigers for Insert, Delete and Update (Created by you) on the
table of interest.
2. These triggers write rows into a table (created by you???). The demo uses
IBO$DML_CACHE. In the row is the Username that wrote it, the Operation
(Insert delete etc), and the Key for the row that has been modified.
3. An event is generated, which is named IBO$DML_CACHE, this could be called
anything you like, however.
At the Client
1. The SyncCursor Component creates a TIB_EVENT, which listens for the
IBO$DML_CACHE event.
2. In the SyncCursor object, it generates a query to retreive the last entry
in the DML_CACHE table, works out if the Username of the Sender is the same
as the Clients Username, if so, it discards the event.
If different, if packages it the columns of the IBO$DML_CACHE query and
calls the IBO$DML_CACHE event handler you have registered in the Grid
component.
If all you are interested in is being notified of a change, you just have to
set up a TIB_EVENT component to listen for the IBO$DML_CACHE event, from
there, you can do what you like..
There is also DMLCACHEing done between components on the same connection,
but that all seems to be internal to IBO and automatic.
----- Original Message -----
From: <guido.klapperich@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, February 24, 2002 7:33 PM
Subject: Re: [IBO] How to react on a DMLCache-Update
> I'm just wondering how the IB_Grid knows, when it has to update the
changed row
> via DML. I haven't found anything in the IB_Grid.pas, perhaps you can give
me a
> hint.
>
>
> Guido
>
> John Peterson wrote:
>
> > Hi Guido,
> > I am assuming you have the DML triggers set up on the table you are
> > watching.
> >
> > 1. The User which changes the table must be different to the user
watching
> > for the event. If they are same IB user, then the event is ignored by
IBO.
> > 2. You must use the SyncILVS component, and prepare it for events to
fire.
> > ie IB_Sync.Prepare; (I do this in the after connect event).
> > 3. Verify you are watching for the correct event in the SYNC component.
> >
> > For more info, see the SurveyApp demo program in D4Apps, it uses DML
Cache.
> >
> > HTH
> > John
> >
> > ----- Original Message -----
> > From: <guido.klapperich@...>
> > To: <IBObjects@yahoogroups.com>
> > Sent: Saturday, February 23, 2002 9:18 PM
> > Subject: Re: [IBO] How to react on a DMLCache-Update
> >
> > > I have tried the event, but it doesn't fire. Besides I don't want to
> > customize
> > > the behaviour of this event, I just want to know, when it happens.
> > >
> > >
> > > Guido
> > >
> > > "Helen Borrie (TeamIBO)" wrote:
> > >
> > > > At 11:21 AM 23-02-02 +0100, you wrote:
> > > > >I'm looking for an event, that fires, when a dataset is updated via
> > > > >DMLCaching. For example the IB_Grid automaticly displays the
updated
> > > > >record, so it react on this event, but I haven't found anything.
> > > >
> > > > Guido,
> > > > Look at the OnDMLCacheReceivedItem event of the dataset receiving
the
> > event
> > > > - the help even shows you how to customise this event to your own
> > behaviour.
> > > >
> > > > regards,
> > > > Helen Borrie (TeamIBO Support)
> > > >
> > > > ** Please don't email your support questions privately **
> > > > Ask on the list and everyone benefits
> > > > Don't forget the IB Objects online FAQ - link from any page at
> > > > www.ibobjects.com
> > > >
> > > >
> > > >
> >
___________________________________________________________________________
> > > > 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/
> > >
> > >
> > >
> >
___________________________________________________________________________
> > > 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/
> > >
> > >
> > >
> >
> >
> >
___________________________________________________________________________
> > 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/
>
>
>
>
___________________________________________________________________________
> 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/
>
>