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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement