Dos Error 2 : Access from network

Dos Error 2 : Access from network

Postby Milan Mehta » Thu Dec 14, 2006 6:32 am

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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Antonio Linares » Sun Dec 17, 2006 10:09 pm

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

Postby Milan Mehta » Mon Dec 18, 2006 4:37 am

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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Antonio Linares » Mon Dec 18, 2006 7:55 am

Milan,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Milan Mehta » Mon Dec 18, 2006 10:08 am

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,
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Carles » Mon Dec 18, 2006 2:08 pm

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..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1132
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Postby James Bott » Tue Dec 19, 2006 1:06 am

Milan,

I always put this code at the top of my programs to prevent that.

Code: Select all  Expand view
   // prevent "DOS error 2. File not Found"
   set default to (cFilePath( GetModuleFileName( GetInstance() ) ))


James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests