On 11/21/11 15:17, Sytze de Boer wrote:
> Dan, really appreciate your comment
> A difference in your return is in my error return
> if the error is 1707, I RETURN from the error prg
> You do a RETRY
> Will that make a difference ?
Not really sure. That code is between 10 and 15 years old, and like
anything that always works, I've forgotten why I did it that way!
My checking code looks like this:
*-- Create new .CDX files
************ substitute your files and tags for the following....
use XXDATA
if not file('XXDATA.CDX')
? 'Indexing XXDATA.DBF...'
use XXDATA
index on ID tag ID
index on upper(NAME) tag NAME
endif
set index to XXDATA.CDX
My comment on the 'retry' says it will open the file. I think this is
because 1707 is only thrown the first time, so the retry effectively
lets the code continue. Not sure why I did that instead of 'return';
maybe either one will work. What's important is that you have to open
the .dbf before you can restore the .cdx.
Dan
> On Tue, Nov 22, 2011 at 12:05 PM, Dan Covill<[email protected]> wrote:
>
>> My ErrTrap routine contains this:
>> 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 file
>> endif
>>
_______________________________________________
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.