Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffering with parent and child tables.
Message
From
03/10/2001 03:11:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/10/2001 18:41:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00562744
Message ID:
00563447
Views:
17
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform