>Cetin, thanks for your advice. In the datasession, the buffering mode of the ODETAIL table is set to 5. How can I use the tableupdate() function.
>
>Please teach how to use it.
>
>Best Regards
>Dennis
Dennis,
When you're satisfied with data and should be saved call :
tableupdate(2,.t.,"tablename")
This is a quick start and work in many cases.
Of course parameters might change depending on your case. Look at its help for parameter definitions. It returns a logical meaning if update was succesfull or not. You should check why it failed (ie: it might fail for someone else edited in between - curval() and oldval() do not match).
Help about buffering detailly explain and sample it. Also check wizard buttons save/edit code (wizstyle.vcx - txtbtns).
A save routine (a quite rough skeleton) :
begin transaction
if lEverythingIsOK
if tableupdate(....)
....
end transaction
else
...
endif
else
rollback
endif
Also there is tablerevert().
Cetin