Thank you for your input Nancy. You're right, this should cause an error. I discovered that during this routine I inadvertently turned off my error handling by issuing an ON ERROR statement. When I corrected this I started getting this error, which seems appropriate. I've been running this test over and over with a small .prg using ON ERROR and again with ON ERROR X=ERROR().
The weird thing is it only errors on the latter. I guess I shouldn't worry why VFP isn't picking this up, and just correct it!! How do you delete a tag from a table if the CDX is missing? I'm sure it's simple, but it seems to escape me. Thanks again.
Marcus.
>It makes sense to me that the statement causes an error. The CDX is, after all, missing, and VFP is letting you know that when you open the file. Why you don't get the error under the default error handler _is_ mysterious, but might be because there is actually another error handler that is active and hiding the error from you. In ERRHAN, do you trap for that error, and supress any message about it? Could you, if the CDX is missing, delete the tag first before using and reindexing the table?
>
>>I have a program that re-indexes my tables. However, I've noticed that when I turn on my error handling (ON ERROR DO ERRHAN) I get a "Structual CDX not found" error. When I leave the default VFP error handling on, there is no error. Here is the code that generates the error.
>>
>>IF !FILE('alt1.cdx')
>> USE alt1 *** Error occurs on this line
>> INDEX ON a_lname+a_fname TAG alt1
>>ENDIF
>>
>>Does anyone know what would cause the error to be trapped by error handling, but not by the VFP default error handling? Or even why this statment would cause such an error? Thanks for any help.
>>
>>Marcus.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only