>Thx but how do you use a transaction in a OOP environment,...which button should I create to do that?
>
>Jeff
Here is a simple scenario :
Set buffering mode to optimistic table
Create a button that will dosave
In click event ;
llUpdatefailure = .f.
begin transaction
for i = 1 to numtables
if !(updatable(table+ltrim(str(i))) and tableupdate(0,.f.,table+ltrim(str(i))))
*Inform update is unsuccesfull
llUpdatefailure = .t.
rollback
exit
endif
endfor
if !llUpdatefailure
end transaction
endif
Of course this is a simple backbone. When you gonna make it a clas you should take into account overridden buffering modes, local or remoteviews etc. You can take a look at wizstyles.vcx - txtbtns class. It also contains a simplified save routine.
Cetin