>>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 >>>
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. >* 1the problem is in the SELECT FROM command