Board index » delphi » I'm having troubles with cachupdates and master/detail

I'm having troubles with cachupdates and master/detail

Hi friends,

O help said:
procedure Post; virtual;
Dataset methods that change the dataset state, such as Edit, Insert, or
Append, or that move from one record to another, such as First, Last, Next,
and Prior automatically call Post.
" AUTOMATICALLY CALL POST " this is the problem.
When I move of a record for another with DBNavigator, the record is not
update and yes canceled. I am using a relationship master/detail and
cachedupdates = true in both tables, I also place ApplyUpdates in the event
afterpost of the table master. I'am staing crazy.

Some idea?

Thank you. Marcos


Re:I'm having troubles with cachupdates and master/detail

The " AUTOMATICALLY CALL POST" is the dataset's CheckBrowseMode
method.  What this method does is to check if the dataset is modified,
if it is then it Posts the changes else it Cancels them.
I think that the problem comes when you make changes to the detail
rows and not to the master row. In this case the master is unmodified,
so moving to the next row the CheckBrowseMode cancels the changes.
To overcome this problem force modify a field from the master row when
you change a field from the detail table (eg
MasterField1.value:=MasterField1.value). In this case you ensure that
the master row will be modified.

Paul Lambadaris
Singular Computer Applications
mailto :
www    :

Other Threads