>clear >ON ERROR ? MESSAGE(),ERROR() >? "Expected, the full name :" >ERROR 1,"C:\NOTEXISTS\MYTABLE" >? >? "Observed, VFP removes the path of the not found file name" >? " and two different parameters return the same parameter :" >SELECT * FROM C:\somepath\MYTABLE > >SELECT * FROM C:\anotherpath\MYTABLE >I'm not sure what you're saying here. With the following it seems to work correctly. Certainly, you would use the print command to output an error message in a real application.
ON ERROR DO ShowError WITH MESSAGE(), ERROR() ERROR 1, "C:\InvalidPath\InvalidFileName" ON ERROR PROCEDURE ShowError LPARAMETERS tcMessage, tnError ? tcMessage ? tnError RETURN ENDPROC * Prints: * File 'C:\InvalidPath\InvalidFileName' does not exist. * 1