Page 1 of 1
Dos Error 2 : Access from network
Posted: Thu Dec 14, 2006 6:32 am
by Milan Mehta
Dear All,
I am using May-2006 build. When I try to access an application from the network, it gives me Dos error 2. However when I map that drive, I do not face that problem.
Can someone help ?
TIA
Milan.
Posted: Sun Dec 17, 2006 10:09 pm
by Antonio Linares
Milan,
DOS error 2 means the file can not be found. When you map the drive, its found and there is no error.
Posted: Mon Dec 18, 2006 4:37 am
by Milan Mehta
Dear Antonio,
No my problem is like this :
Suppose using My computer I go \\server\c\test and then click on abc.exe, dos error 2 occurs.
Instead I map \\server\c to Z: drive and then go z:\test\ and click on abc.exe DOS error 2 do not occur.
This was not happening before. Even my pure xHarbour code works fine.
Can you shed light on what am I doing wrong ?
TIA
Milan.
Antonio Linares wrote:Milan,
DOS error 2 means the file can not be found. When you map the drive, its found and there is no error.
Posted: Mon Dec 18, 2006 7:55 am
by Antonio Linares
Milan,
Do you get the same error with samples\tutor02.prg ? thanks,
Posted: Mon Dec 18, 2006 10:08 am
by Milan Mehta
Dear Antonio,
My fault. To explain you more, that error occurs only when it tries to open a dbf file. Rest works fine.
TIA
Milan.
Antonio Linares wrote:Milan,
Do you get the same error with samples\tutor02.prg ? thanks,
Posted: Mon Dec 18, 2006 2:08 pm
by Carles
Milan,
Can you try modify file host in windows\system32\drivers\etc with:
computername ip
regards
Posted: Tue Dec 19, 2006 1:06 am
by James Bott
Milan,
I always put this code at the top of my programs to prevent that.
Code: Select all
// prevent "DOS error 2. File not Found"
set default to (cFilePath( GetModuleFileName( GetInstance() ) ))
James