We solved this same problem with the following code in our ErrorTrap procedure:
if error() = 1707 or upper(message(1)) = "STRUCTURAL CDX FILE NOT FOUND."   *-- 
ignore it, because our programs will build the index.   retry                   
  && which will open the fileendif
When you do 'use MyDBF' it triggers the error because the CDX is missing.  This 
code ignoresthis particular error and opens the DBF without the CDX.  You can 
then test for the CDXand do your re-creation.
Dan Covill

> Date: Thu, 6 Nov 2014 14:24:05 -0800
> From: jsow...@americansentry.net
> To: profoxt...@leafe.com
> Subject: problem with missing cdx file
> 
> I am trying to deal with a bad or missing cdx file.  I have a program 
> that recreates indices.  I test for the existence of the cdx file.  If 
> found I delete it.  Then I recreate the index with the various tags.
> 
> Problem is the program crashes if it cannot find the index the first 
> time.  Of course it changes the header to say there is no cdx file, so 
> my program runs fine the second time.
> 
> thoughts?
> 
> John

                                          

--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/bay169-w343e183e0cb7fba9e478878a...@phx.gbl
** 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