Board index » delphi » master/details problem in ibx's TIBDataset

master/details problem in ibx's TIBDataset

This is not a IBX bug.  It is affecting all data aware controls actually.

The bug is in the TFieldDataLink.UpdateField method.  Changing it to

procedure TFieldDataLink.UpdateField;
begin
  SetField(nil);
  if Active and (FFieldName <> '') then
  begin
    if Assigned(FControl) then
      SetField(GetFieldProperty(DataSource.DataSet, FControl, FFieldName))
    else
      SetField(DataSource.DataSet.FieldByName(FFieldName));
  end
end;

and statically linking this into your app should fix the problem.  

Quote
Frank Wang wrote:

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Live never to be ashamed if anything you do or say is published around the world
- even if what is published is not true.    (R Bach)
 

Re:master/details problem in ibx's TIBDataset


Hi IBX gurus,

  I have a problem with IBX when used it in master/details
situation, using employe.gdb as example:

  1) use a TIBDataset(tbCountry) with SelectSQL as:
        select country from country

  2) use a TIBDataset(tbCustomer) with SelectSQL as:
        select country, customer, address_line1 from
        customer where country = :country

  3) link tbCustomer to tbCountry thru datasource(dsCountry)
  4) use a dbnavigator to link to dsCountry
  5) use 3 dbedits to connect to the fields in tbCustomer
  6) use a dbgrid to connect to tbcustomer

  When navigating the master several times, the dbedits
will not display details correctly. however, dbgrid in
#6 correctly displays the field value.

  I tried this example with Free IB's FIBDataset, the same
problem. with IBX's TIBTable, it works, but I don't want to
use TIBTable.

  Could someone try this test and let me if I'm the only one
having  this problem? any help will be highly appreciated.

Frank

Re:master/details problem in ibx's TIBDataset


it works! thanks. checked with old D4 source, what u suggested
was exactly the same with D4, wondering why D5 change
it

Jeff Overcash (TeamB) <overc...@onramp.net> wrote in article
<385868E7.94DB3...@onramp.net>...

Quote
> This is not a IBX bug.  It is affecting all data aware controls actually.

> The bug is in the TFieldDataLink.UpdateField method.  Changing it to

> procedure TFieldDataLink.UpdateField;
> begin
>   SetField(nil);
>   if Active and (FFieldName <> '') then
>   begin
>     if Assigned(FControl) then
>       SetField(GetFieldProperty(DataSource.DataSet, FControl,
FFieldName))
>     else
>       SetField(DataSource.DataSet.FieldByName(FFieldName));
>   end
> end;

Re:master/details problem in ibx's TIBDataset


Speed. Only they did make it a bit to Quick.

Greetings Andre Mens

Frank Wang <w...@cebu.weblinq.com> schreef in berichtnieuws
01a8e75d$fafd57c0$1d1ba2d0@josef...

Quote
> it works! thanks. checked with old D4 source, what u suggested
> was exactly the same with D4, wondering why D5 change
> it

> Jeff Overcash (TeamB) <overc...@onramp.net> wrote in article
> <385868E7.94DB3...@onramp.net>...
> > This is not a IBX bug.  It is affecting all data aware controls
actually.

> > The bug is in the TFieldDataLink.UpdateField method.  Changing it to

> > procedure TFieldDataLink.UpdateField;
> > begin
> >   SetField(nil);
> >   if Active and (FFieldName <> '') then
> >   begin
> >     if Assigned(FControl) then
> >       SetField(GetFieldProperty(DataSource.DataSet, FControl,
> FFieldName))
> >     else
> >       SetField(DataSource.DataSet.FieldByName(FFieldName));
> >   end
> > end;

Re:master/details problem in ibx's TIBDataset


It was intended to fix an very minor bug concerning memos.  Unfortunately in
fixing this minor bug a much larger one was introduced.  If you instantiate the
fields it happens immeadiately and not after X number of scolls.  This should be
what the patch (when released) reverts back to.

Quote
Frank Wang wrote:

> it works! thanks. checked with old D4 source, what u suggested
> was exactly the same with D4, wondering why D5 change
> it

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Live never to be ashamed if anything you do or say is published around the world
- even if what is published is not true.    (R Bach)

Other Threads