>>>Hello All,
>>>
>>>I am looking for suggestions on how to effectively implement buffering for a one-to-many form. This is not the entire scope of the project but mastering this technique would be just great. I know what to do for a single table, it is the child tables where I am confused.
>>>The code below would be indicative of what I would do for a single table.
>>>
>>> Set Multilocks On
>>> CURSORSETPROP("Buffering",4, "cust" )
>>> If TableUpdate()
>>> ThisForm.Refresh
>>> Else
>>> Messagebox("Update Not Sucessful")
>>> EndIf
>>>
>>>I am trying to determine if I should just select the child then do the above code again or if there is a more streamlined approach.
>>Eric,
>>General tendency is to use row level buffering for parent and table level buffering on child. I use table buffering on both. You could add transaction to updating part.
>>Cetin,
>
>I agree with your recommendation, its the syntax where I have issue. To implement your technique how would I modify the above-mentioned code to allow buffering on a child table named "Coke" and another named "Pepsi" within the same block of code.
set multilocks on
set exclusive off
use Pepsi in 0
use Coke in 0 order Tag FKPepsi
select Pepsi
set relation to PKPepsi into Coke
cursorsetprop('Buffering',5,'Pepsi')
cursorsetprop('Buffering',5,'Coke')
begin transaction
if tableupdate(2,.t.,'Pepsi') and tableupdate(2,.t.,'Coke')
end transaction
else
rollback
Messagebox("Update Not Sucessful")
endif
Cetin