Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert into VS TableUpdate with Buffering on
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00125610
Message ID:
00125627
Views:
11
>>>>>If have a form with the bufferig on ( pessimistic row beffering) and I have a special function that will insert many copy of the record in a table.
>>>>>ex:
>>>>> For x = 1 to lNbToAdd
>>>>> Insert into MyTable ( ...
>>>>> endfor
>>>>>
>>>>>Do I need to do the tableUpdate in the loop or only after the loop?
>>>>
>>>>Personally, I don't use pessimistic buffering and can just guess that when you move record pointer (and INSERT really does it) you will trigger tableupdate() for row buffering automatically.
>>>
>>>So I need a tableupdate() after the loop for the last insert?
>>>
>>>BTW the "pessimistic row beffering" is use for a special case but the same question apply to Optimistique row buffering.
>>
>>I think it would be even simpler to move pointer one more time when loop is finished.
>So something like
>for x = 1 to nbtoadd
> insert into mytable (...
>endfor
>lncur = recno()
>go top
>go lncur

I guess yes, but I would test it first. Pessimistic buffering is really rare setting.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform