Subject Re: [IBO] Dataset refresh
Author radevojvodic
Hi Rob,

There is a easy way you can do this. You just need to set an
AfterInsert and AfterEdit trigger which will do POST_EVENT
(POST_EVENT 'ItemChanged') and you should set IB_EventAlerter and
register that event on Invoice form then every change in Item table
will be captured. In the event alerter component you could set
OnEvent method to do Invoice.Refresh.
It should work even in multi-user enviroment.



--- In IBObjects@yahoogroups.com, "Robert martin" <rob@c...> wrote:
>
> Sorry Alan I should have been clearer. I am using the built in
Transaction of the IBODatabase component. This means, I think, that
like the BDE every Post completes a transaction. I am only using
explicit transactions in some areas at the moment (transactions do
not work well with BDE / Dbase).
>
> I believe you are most likely right about an explicit refresh
being required, I suspected this from the outset. My hope was that
there was a simple / generic C/S system to handle the issue. I am
slowing comming to grips with some of the issues :)
>
> Im off home now !
>
>
> Rob Martin
> Software Engineer
>
> phone 03 377 0495
> fax 03 377 0496
> web www.chreos.com
> Wild Software Ltd
> ----- Original Message -----
> From: Alan McDonald
> To: IBObjects@yahoogroups.com
> Sent: Tuesday, September 07, 2004 5:10 PM
> Subject: RE: [IBO] Dataset refresh
>
>
> > Hi Alan
> >
> > Its not a commit or transaction issue as I am using IBO (as
> > opposed to IB_) components
>
> I have no idea what you mean by this... you can have
commit/transaction
> "issues" in any and all db components... what do you think is
the difference
> between the components? The IB_ components do not descend from
the TDataset
> class whereas the IBO components do and are compatible with
TQuery etc
> components but they both use transactions....
>
> to speed conversion (it is a very
> > large app). Just now I was in the invoice screen, opened the
> > client management screen and added a new client, went back to
the
> > invoice screen and selected the client from a combo. This
works
> > great, however if I do the same with item price (and likely
other
> > areas), when I add the item to the invoice it does not show.
> > Perhaps the Combos are doing a refresh before they locate?
> >
> >
>
> I dare say that when you drop the combo, it does a refresh of
the underlying
> query. If you want a record in the invoice screen to reflect the
changed
> price of the edits you made elsewhere, you will need to refresh
at least
> that record in the grid or control. This can be done manually
by the user
> (screen button) or automatically where you think most
appropriate e.g. event
> driven. There are many other places/events you can use to drive
this refresh
> and it doesn't have to be the entire recordset but rather the
single record
> in question.
> Bottom line - C/S works very differently from desktop database
> environments - there are many advantages but also things you
need to get
> used to
> Alan
>
> > Commit
> > Rob Martin
> > Software Engineer
> >
> > phone 03 377 0495
> > fax 03 377 0496
> > web www.chreos.com
> > Wild Software Ltd
> > ----- Original Message -----
> > From: Alan McDonald
> > To: IBObjects@yahoogroups.com
> > Sent: Tuesday, September 07, 2004 4:40 PM
> > Subject: RE: [IBO] Dataset refresh
> >
> >
> > > Hi All
> > >
> > > We have an application that has multiple screens open
> > > simultaneously. It has an invoice screen. If someone
alters the
> > > price of an item using another screen while the invoice
screen is
> > > open, the screen does not pick up the changes until closed
and
> > > reopened. This is happening in a variety of places.
Previously
> > > the application was Dbase / BDE and this was all handled
for us.
> > >
> > > I know I could do refreshes in specific places but the
code is
> > > large and we would surely miss some / cause other
problems / slow
> > > performance. Is there a good / better way to simulate the
old
> > > BDE behaviour? Am I missing something?
> > >
> > >
> > > Rob Martin
> > > Software Engineer
> >
> > I don't suppose you mean close and reopen the screen where
the
> > edits have
> > been done?
> > If so then maybe you don't know about commit? - maybe you are
> > only commit
> > retaining? your edits?
> > am I on the right track?
> > Alan
> >
> >
> >
> >
> >
> >
__________________________________________________________________
> > _________
> > 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 !
> >
> >
> >
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------
---
> > ------------
> > Yahoo! Groups Links
> >
> > a.. To visit your group on the web, go to:
> > http://groups.yahoo.com/group/IBObjects/
> >
> > b.. To unsubscribe from this group, send an email to:
> > IBObjects-unsubscribe@yahoogroups.com
> >
> > c.. Your use of Yahoo! Groups is subject to the Yahoo!
Terms
> > of Service.
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
__________________________________________________________________
> > _________
> > 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 !
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
_____________________________________________________________________
______
> 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 !
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
>
> -------------------------------------------------------------------
-----------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/IBObjects/
>
> b.. To unsubscribe from this group, send an email to:
> IBObjects-unsubscribe@yahoogroups.com
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.
>
>
>
> [Non-text portions of this message have been removed]