Board index » delphi » Detail table in Master/Detail not updating automatically

Detail table in Master/Detail not updating automatically

PROBLEM:
When I create a new record in a master table the detail table does not
update automatically.
After the insert I have to re-open the detail table for correct records,
which should be none.
( I believe this should be automatic and something funny is going on )
When I add in the new record in the master table I disable the table filter
and enable the filter ones the change is posted.

In other parts of the application the master/detail behaves fine but the
only place it doesn't is on the above situation.

CONFIGURATION:
Delphi 2
BDE5.01
Win NT4
Paradox database

TDatabase.DatabaseName := FrontOff
CachedUpdate set to FALSE

Name                  := dbInv ( Master table , invoices table )
DataSource        := FrontOff
TableName         := 'Inv.db'
Filter                     := ( only list invoices that have not been
finished )
Filtered                := TRUE
Primary key 'Inv#'

Name                    := dbInvItm ( Detail Table, Invoice items table )
DataSource         := FrontOff;
Tablename          := 'InvItm'
MasterSource     := DataSource which is connected to Table dbInv
MasterField         := 'Inv#'
IndexFieldName := 'Inv#'
Filtered                := FALSE

 

Re:Detail table in Master/Detail not updating automatically


A call to dbInvItm.REFRESH should do the trick.

Regards,
AP

Quote
Paul Hectors <pa...@commsoftgroup.com> wrote in message

news:8cb6oj$gpa6@bornews.borland.com...
Quote
> PROBLEM:
> When I create a new record in a master table the detail table does not
> update automatically.
> After the insert I have to re-open the detail table for correct records,
> which should be none.
> ( I believe this should be automatic and something funny is going on )
> When I add in the new record in the master table I disable the table
filter
> and enable the filter ones the change is posted.

> In other parts of the application the master/detail behaves fine but the
> only place it doesn't is on the above situation.

> CONFIGURATION:
> Delphi 2
> BDE5.01
> Win NT4
> Paradox database

> TDatabase.DatabaseName := FrontOff
> CachedUpdate set to FALSE

> Name                  := dbInv ( Master table , invoices table )
> DataSource        := FrontOff
> TableName         := 'Inv.db'
> Filter                     := ( only list invoices that have not been
> finished )
> Filtered                := TRUE
> Primary key 'Inv#'

> Name                    := dbInvItm ( Detail Table, Invoice items table )
> DataSource         := FrontOff;
> Tablename          := 'InvItm'
> MasterSource     := DataSource which is connected to Table dbInv
> MasterField         := 'Inv#'
> IndexFieldName := 'Inv#'
> Filtered                := FALSE

Re:Detail table in Master/Detail not updating automatically


I am sorry but I forgot to mention this in my message.

I have tried Refresh method and  it makes no difference.

Quote
AP wrote in message <8ce05p$b...@bornews.borland.com>...
>A call to dbInvItm.REFRESH should do the trick.

>Regards,
>AP

>Paul Hectors <pa...@commsoftgroup.com> wrote in message
>news:8cb6oj$gpa6@bornews.borland.com...
>> PROBLEM:
>> When I create a new record in a master table the detail table does not
>> update automatically.
>> After the insert I have to re-open the detail table for correct records,
>> which should be none.
>> ( I believe this should be automatic and something funny is going on )
>> When I add in the new record in the master table I disable the table
>filter
>> and enable the filter ones the change is posted.

>> In other parts of the application the master/detail behaves fine but the
>> only place it doesn't is on the above situation.

>> CONFIGURATION:
>> Delphi 2
>> BDE5.01
>> Win NT4
>> Paradox database

>> TDatabase.DatabaseName := FrontOff
>> CachedUpdate set to FALSE

>> Name                  := dbInv ( Master table , invoices table )
>> DataSource        := FrontOff
>> TableName         := 'Inv.db'
>> Filter                     := ( only list invoices that have not been
>> finished )
>> Filtered                := TRUE
>> Primary key 'Inv#'

>> Name                    := dbInvItm ( Detail Table, Invoice items table )
>> DataSource         := FrontOff;
>> Tablename          := 'InvItm'
>> MasterSource     := DataSource which is connected to Table dbInv
>> MasterField         := 'Inv#'
>> IndexFieldName := 'Inv#'
>> Filtered                := FALSE

Other Threads