Message
From
20/12/1996 14:23:58
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00015680
Message ID:
00015728
Views:
39
>>When I open a table (SaleTemp.dbf) in my app, I want to be sure that it is empty. So here is what I do:
>>
>>IF RECCOUNT() > 0
>> USE
>> SELE 0
>> USE SaleTemp Excl
>> DELETE ALL
>> PACK
>> USE
>> SELE 0
>> USE SaleTemp
>>ENDIF
>>
>>The problem is that optomistic row buffering, which is set for the form, is, from the error messages I get, lost (I can't, for example, TABLEUPDATE()). If I REM out the above code, everything works.
>>
>>Why? How should I handle this?
>
>You can use Cursorsetprop to turn off buffering while you Zap, at least that's what I do for this. Have you tried this? (BTW, Zap is faster than Delete All/Pack)

Bruce:

I haven't used CursorSetProp, but I will. Am curious to know why opening a file EXCL forces me to re-establish buffering.

BTW, I haven't been using ZAP as a carryover from my Clipper DOS days: I kept getting corrupted tables (unwanted EOF's) from ZAPping (best I could tell). If it's safe to use in VFP, great!

Thanks, again, for the help.

John
Previous
Next
Reply
Map
View