Information générale
Catégorie:
Codage, syntaxe et commandes
>>>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement