General information
Category:
Coding, syntax & commands
I could recreate this error.
Please note that this error does not come up in the usual Visual FoxPro Error message window, which will have the title of the window = 'Visual FoxPro' and then the error message.
The 'Invalid Subscript Reference' comes in a error message window with the title 'Program Error' and is not taken care of by my error handler.
This is where the error occurs:
do while .t.
*doevents
errorval = 0
RENAME "c:\MyFile." TO "c:\YourFile."
if errorval=1
loop
* else
* exit
endif
enddo
I am trying to rename MyFile. If an error occurs, it should go to my Error handler which will make a note of this error in the Log file and sets errorval=1, which will force FoxPro to be in the loop until it successfully renames the file.
And as you can see, I have commented the ELSE part, which is supposed to cause FoxPro to exit the Loop when it successfully renames the file. If this is uncommented I will not get this error.
Any thoughts anyone?
Ria
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