>Goodday!
>
>I was adviced that i should not make my code pathing "hardcore", as they call it. So i did first it worked well then after i changed the directory to test if it work it didn't
>
>
>To sum it up:
>The structure of the source file is this "c:\pleasure\dbase"
>I have a table named "password" inside "c:\pleasure\dbase "
>I used the command set path to '\dbase\' so the pathing would not be "hardcore".
Mistake 1 - the path "\dbase\" is based from the root of the drive, not relative to the current directory. A relative path would either use the "." prefix, or would omit the leading "\".
>Then I issued this command use "use password in 2"
>And then i used the the setup wizard and I installed the application to " c:\tmp\" .
>When i execute the program it produces an erorr saying that it cannot find "c:\tmp\password.dbc".
>Why did it looked for the "password" table in "c:temp" when i issued a seth path command.
SET PATH must be issued correctly each time the application runs. SET PATH specifies a list of directories to search when a non-fully qualified pathname is specified and the file does not exist in the current directory. If the file is not in the current directory and cannot be found along the search path, the error reports that thefile does not exist inthe current directory.
Relative pathing works based on the current working directory. If I had the path set to DATA, MISC, and I were in the directory "C:\TEMP", it would search for the file first in C:\TEMP, then in C:\TEMP\DATA, then in C:\TEMP\MISC
I think you need to do a little research on how the Windows/DOS path environment works - this is not a VFP problem, it's a major misunderstanding of how the operating system looks for things.
>
>
>
>thanks