General information
Category:
Coding, syntax & commands
>>>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
I´ve used ZAP since 1985 in clipper, dbase, visual dbase, visual fox and I never had problems
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only