Dos Error 2 : Access from network

Post Reply
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Dos Error 2 : Access from network

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Milan,

Do you get the same error with samples\tutor02.prg ? thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post 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,
User avatar
Carles
Posts: 937
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona
Contact:

Post by Carles »

Milan,

Can you try modify file host in windows\system32\drivers\etc with:

computername ip


regards
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
Post Reply