Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with cached updates!

1 view
Skip to first unread message

jericj...@my-deja.com

unread,
Aug 13, 1999, 3:00:00 AM8/13/99
to
In article <7ogqrc$1q...@forums.borland.com>,
"José Ramón Aguilar" <ragu...@uagunix.uag.mx>
wrote:
> I'm creating a master/detail form with
CachedUpdates and Interbase 5, just
> like the MastApp example, it works fine while
the data inserted is ok, but
> if there are any error like duplicate Key or
something like that the bde
> throws an exception that i can handle in
UpdateError event, but what i want
> is let the user to correct the error, so i use
the following code:
>
> procedure MasterTableAfterPost (Dataset :
TDataSet);
> begin
> try
> Database.ApplyUpdates([MasterTable,
Detailtable]);
> except
> MasterTable.Refresh;
> MasterTable.Edit;
> end;
>
> But when i attempt to Post the master table
again i get the error "At end of
> table".
>
> What does it mean?? What can i do to solve the
problem?? The approach i´m
> using is correct or not??
>
> Please help, i´m going crazy with this!!!
>

This is a dumb problem that Delphi/BDE has, but
when you apply cached updates on a table that is
either filtered by the UpdateRecordTypes property
or a Master/Detail relationship and currently
displays no records.

The hacked in solution is one or both of the
following:
1) If you are using the UpdateRecordTypes
property, include all record types before
actually applying the updates.
2) Walk the master table until the detail table
has records displayed, then apply the updates.

This is especially a pain if you have two detail
tables controlled by one master - then you may
have to walk the master and apply updates on the
details one at a time.

Eric Johnson


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

jericj...@my-deja.com

unread,
Aug 13, 1999, 3:00:00 AM8/13/99
to

This is a dumb problem that Delphi/BDE has when you apply cached


updates on a table that is either filtered by the UpdateRecordTypes
property or a Master/Detail relationship and currently displays no
records.

The hacked in solution is one or both of the following:
1) If you are using the UpdateRecordTypes property, include all record
types before actually applying the updates.
2) Walk the master table until the detail table has records displayed,
then apply the updates.

Either way, make sure the table is displaying records before applying

0 new messages