At 04:27 PM 9/6/2011 -0400, MB Software Solutions,      LLC wrote:
>On 9/6/2011 4:03 PM, [email protected] wrote:
> > I found that zap usually fails with VFP9 SP2. I use delete all and pack 
> and have no problems at all. (pack requires
> > exclusive use, same as zap)
>
>Really?  What's the failure message?  You're right that DELETE ALL and
>PACK is equivalent, but I thought I recall ZAP being quicker.  ??

If you've got a few hundred thousand records in the table, ZAP would be 
quite a bit faster.

Heck, I'd be tempted to do my own ZAP routine before going the DELETE ALL / 
PACK route...

Function myzap
parameter cTbl2Zap
LOCAL cDataDir
cDataDir = addbs(justpath(dbc()))

select (cTbl2Zap)
copy structure to (cDataDir + cTbl2Zap + "_tmpthing") database (dbc()) with CDX
DROP TABLE (cTbl2Zap)
USE (cTbl2Zap + "_tmpthing")
copy structure to (cDataDir + cTbl2Zap) database (dbc()) with cdx
drop table (cTbl2Zap + "_tmpthing")
use (cTbl2Zap)

return


Of course, if ZAP was hitting an error, maybe the DROP TABLE would have 
triggered the same thing....?

-Charlie



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to