Board index » delphi » Odd Master/Detail Behaviour

Odd Master/Detail Behaviour

We had the same problem.
There is a new property called AutoRefresh with TQuery and TTable
Set your Query1.AutoRefresh:=True

It's very important to do with with any Master Detail  or any SQL in which a
Datasource is required.

Regards,
Les

Quote
Ed Malloy <e...@BBLFleet.com> wrote in message

news:388DD7DE.4CA1A732@BBLFleet.com...
Quote
> Hi All,

> I'm experiencing some disturbing behaviour  in an application with many
Master/Detail
> relationships.

> The application is a large, and old application that began in Delphi 1 and
has been
> updated continuously, now in Delphi 5. I "runs" our business: including
order entry,
> fulfillment, supplier invoicing, etc. etc. Admittedly it is large, and not
optimized.

> On some of our users pc's, all 38 MgB+ Pentium II+, Windows 95 OEM 2 + the
linkages do
> not always update: that is the user can move from one master record to
another and
> some of the data from the detail tables of the previous master remain
visible -- not
> just on the current screen, but other pages of a tabbed notebook!

> I can't replicate the behaviour on my workstation. The behaviour seems to
be related
> to having multiple programs open, especially if the other programs are
also using BDE
> files.

> Our Network is Novell 5, with all updates. Most machines are connected at
100 Mps. The
> tables are Paradox 5&7 using the latest BDE upgrade. All users use the
same .net file
> ...

> This behaviour only began after the last Delphi/BDE upgrade, but the
program is
> growing too, so I cant attribute it, for sure, to the new program.

> Any similar occurrences? I've move away from Master/Detail to doing
explicit
> "findKeys" in the Master Tables dataSource onNewData event, and that seems
to have
> solved the problem. But I guess I can't trust Master/Detail until I know
more about
> what might be causing this behaviour (and Yes, I haven't ruled out the
users ).

> Any comments welcome, except those stating that I should use Win NT
workstations :)

> tia

> ed
> --

> Edward V. Malloy
> BBL Leasing, Inc.

 

Re:Odd Master/Detail Behaviour


Sounds like a Delphi 5 update pack is coming.

The bug below is a serious one for our company's application.

Les

Jeff Overcash (TeamB) <overc...@onramp.net> wrote in message
news:388DF0BE.3808AD@onramp.net...

Quote
> There is a D5 VCL bug that sounds very simular to what you are
experiancing.
> Try this solution.  Change the TFieldDataLink.UpdateField to

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

> Then statically link the changed pas file into your app.  See if that
helps.

> Ed Malloy wrote:

> > Hi All,

> > I'm experiencing some disturbing behaviour  in an application with many
Master/Detail
> > relationships.

> > The application is a large, and old application that began in Delphi 1
and has been
> > updated continuously, now in Delphi 5. I "runs" our business: including
order entry,
> > fulfillment, supplier invoicing, etc. etc. Admittedly it is large, and
not optimized.

> > On some of our users pc's, all 38 MgB+ Pentium II+, Windows 95 OEM 2 +
the linkages do
> > not always update: that is the user can move from one master record to
another and
> > some of the data from the detail tables of the previous master remain
visible -- not
> > just on the current screen, but other pages of a tabbed notebook!

> > I can't replicate the behaviour on my workstation. The behaviour seems
to be related
> > to having multiple programs open, especially if the other programs are
also using BDE
> > files.

> > Our Network is Novell 5, with all updates. Most machines are connected
at 100 Mps. The
> > tables are Paradox 5&7 using the latest BDE upgrade. All users use the
same .net file
> > ...

> > This behaviour only began after the last Delphi/BDE upgrade, but the
program is
> > growing too, so I cant attribute it, for sure, to the new program.

> > Any similar occurrences? I've move away from Master/Detail to doing
explicit
> > "findKeys" in the Master Tables dataSource onNewData event, and that
seems to have
> > solved the problem. But I guess I can't trust Master/Detail until I know
more about
> > what might be causing this behaviour (and Yes, I haven't ruled out the
users ).

> > Any comments welcome, except those stating that I should use Win NT
workstations :)

> > tia

> > ed
> > --

> > Edward V. Malloy
> > BBL Leasing, Inc.

> --
> Jeff Overcash (TeamB)   On waves of silver I dreamed of gold
> (Please do not email    'Till I lost the peace that dreaming gives
>  me directly unless     I dreamed of the moment of my own death
>  asked.  Thank You)     That no one ever dreams and lives (Marillion)

Re:Odd Master/Detail Behaviour


Hi All,

I'm experiencing some disturbing behaviour  in an application with many Master/Detail
relationships.

The application is a large, and old application that began in Delphi 1 and has been
updated continuously, now in Delphi 5. I "runs" our business: including order entry,
fulfillment, supplier invoicing, etc. etc. Admittedly it is large, and not optimized.

On some of our users pc's, all 38 MgB+ Pentium II+, Windows 95 OEM 2 + the linkages do
not always update: that is the user can move from one master record to another and
some of the data from the detail tables of the previous master remain visible -- not
just on the current screen, but other pages of a tabbed notebook!

I can't replicate the behaviour on my workstation. The behaviour seems to be related
to having multiple programs open, especially if the other programs are also using BDE
files.

Our Network is Novell 5, with all updates. Most machines are connected at 100 Mps. The
tables are Paradox 5&7 using the latest BDE upgrade. All users use the same .net file
...

This behaviour only began after the last Delphi/BDE upgrade, but the program is
growing too, so I cant attribute it, for sure, to the new program.

Any similar occurrences? I've move away from Master/Detail to doing explicit
"findKeys" in the Master Tables dataSource onNewData event, and that seems to have
solved the problem. But I guess I can't trust Master/Detail until I know more about
what might be causing this behaviour (and Yes, I haven't ruled out the users ).

Any comments welcome, except those stating that I should use Win NT workstations :)

tia

ed
--

Edward V. Malloy
BBL Leasing, Inc.

Re:Odd Master/Detail Behaviour


There is a D5 VCL bug that sounds very simular to what you are experiancing.
Try this solution.  Change the TFieldDataLink.UpdateField to

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

Then statically link the changed pas file into your app.  See if that helps.

Quote
Ed Malloy wrote:

> Hi All,

> I'm experiencing some disturbing behaviour  in an application with many Master/Detail
> relationships.

> The application is a large, and old application that began in Delphi 1 and has been
> updated continuously, now in Delphi 5. I "runs" our business: including order entry,
> fulfillment, supplier invoicing, etc. etc. Admittedly it is large, and not optimized.

> On some of our users pc's, all 38 MgB+ Pentium II+, Windows 95 OEM 2 + the linkages do
> not always update: that is the user can move from one master record to another and
> some of the data from the detail tables of the previous master remain visible -- not
> just on the current screen, but other pages of a tabbed notebook!

> I can't replicate the behaviour on my workstation. The behaviour seems to be related
> to having multiple programs open, especially if the other programs are also using BDE
> files.

> Our Network is Novell 5, with all updates. Most machines are connected at 100 Mps. The
> tables are Paradox 5&7 using the latest BDE upgrade. All users use the same .net file
> ...

> This behaviour only began after the last Delphi/BDE upgrade, but the program is
> growing too, so I cant attribute it, for sure, to the new program.

> Any similar occurrences? I've move away from Master/Detail to doing explicit
> "findKeys" in the Master Tables dataSource onNewData event, and that seems to have
> solved the problem. But I guess I can't trust Master/Detail until I know more about
> what might be causing this behaviour (and Yes, I haven't ruled out the users ).

> Any comments welcome, except those stating that I should use Win NT workstations :)

> tia

> ed
> --

> Edward V. Malloy
> BBL Leasing, Inc.

--
Jeff Overcash (TeamB)   On waves of silver I dreamed of gold
(Please do not email    'Till I lost the peace that dreaming gives
 me directly unless     I dreamed of the moment of my own death
 asked.  Thank You)     That no one ever dreams and lives (Marillion)

Re:Odd Master/Detail Behaviour


This is going to be addressed in the patch I am fairly certain.  Meanwhile you
can fix it as long as you don't use the Borland supplied packages.

Quote
Les Piotrowski wrote:

> Sounds like a Delphi 5 update pack is coming.

> The bug below is a serious one for our company's application.

> Les

--
Jeff Overcash (TeamB)   On waves of silver I dreamed of gold
(Please do not email    'Till I lost the peace that dreaming gives
 me directly unless     I dreamed of the moment of my own death
 asked.  Thank You)     That no one ever dreams and lives (Marillion)

Re:Odd Master/Detail Behaviour


Thanks Jeff,

do I nieed to explicitly include the dbctrls.pas in my uses clause? How do I ensure
that a correct dcu is created every time?

ed

Quote
"Jeff Overcash (TeamB)" wrote:

> There is a D5 VCL bug that sounds very simular to what you are experiancing.
> Try this solution.  Change the TFieldDataLink.UpdateField to

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

> Then statically link the changed pas file into your app.  See if that helps.

> Ed Malloy wrote:

> > Hi All,

> > I'm experiencing some disturbing behaviour  in an application with many Master/Detail
> > relationships.

> > The application is a large, and old application that began in Delphi 1 and has been
> > updated continuously, now in Delphi 5. I "runs" our business: including order entry,
> > fulfillment, supplier invoicing, etc. etc. Admittedly it is large, and not optimized.

> > On some of our users pc's, all 38 MgB+ Pentium II+, Windows 95 OEM 2 + the linkages do
> > not always update: that is the user can move from one master record to another and
> > some of the data from the detail tables of the previous master remain visible -- not
> > just on the current screen, but other pages of a tabbed notebook!

> > I can't replicate the behaviour on my workstation. The behaviour seems to be related
> > to having multiple programs open, especially if the other programs are also using BDE
> > files.

> > Our Network is Novell 5, with all updates. Most machines are connected at 100 Mps. The
> > tables are Paradox 5&7 using the latest BDE upgrade. All users use the same .net file
> > ...

> > This behaviour only began after the last Delphi/BDE upgrade, but the program is
> > growing too, so I cant attribute it, for sure, to the new program.

> > Any similar occurrences? I've move away from Master/Detail to doing explicit
> > "findKeys" in the Master Tables dataSource onNewData event, and that seems to have
> > solved the problem. But I guess I can't trust Master/Detail until I know more about
> > what might be causing this behaviour (and Yes, I haven't ruled out the users ).

> > Any comments welcome, except those stating that I should use Win NT workstations :)

> > tia

> > ed
> > --

> > Edward V. Malloy
> > BBL Leasing, Inc.

> --
> Jeff Overcash (TeamB)   On waves of silver I dreamed of gold
> (Please do not email    'Till I lost the peace that dreaming gives
>  me directly unless     I dreamed of the moment of my own death
>  asked.  Thank You)     That no one ever dreams and lives (Marillion)

--

Edward V. Malloy
BBL Leasing, Inc.

Re:Odd Master/Detail Behaviour


I usually put the modified copy into my project directory and then add the pas
to the project.  Once compiled I copy the modified dcu to the lib directory so
all the other projects will get the same fix.  Of course that means not using
the DB packages (you can use other packages, just not the vcldb50 one).

Quote
Ed Malloy wrote:

> Thanks Jeff,

> do I nieed to explicitly include the dbctrls.pas in my uses clause? How do I ensure
> that a correct dcu is created every time?

> ed

--
Jeff Overcash (TeamB)   On waves of silver I dreamed of gold
(Please do not email    'Till I lost the peace that dreaming gives
 me directly unless     I dreamed of the moment of my own death
 asked.  Thank You)     That no one ever dreams and lives (Marillion)

Other Threads