Re: VFP9SP2 - Error 2066: Index file "z:\data\costs.cdx" tag "Njobid"iscorrupted. Please rebuild it.

Author: MB Software Solutions, LLC

Posted: 2011-09-07 at 00:16:37

On 9/6/2011 8:44 PM, Charlie Coleman wrote:

> At 04:27 PM 9/6/2011 -0400, MB Software Solutions, LLC wrote:

>> On 9/6/2011 4:03 PM, kamcginnis@gmail.com 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....?

Neat idea, Charlie! I'll consider it. No, the ZAP wasn't the line

hitting the error.

--

Mike Babcock, MCP

MB Software Solutions, LLC

President, Chief Software Architect

http://mbsoftwaresolutions.com

http://fabmate.com

http://twitter.com/mbabcock16

_______________________________________________

Post Messages to: ProFox@leafe.com

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/4E66F025.7070209@mbsoftwaresolutions.com

** 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.

©2011 MB Software Solutions, LLC