Network problems with Windows Server 2003
Posted: Tue Apr 08, 2008 1:21 pm
Hi all,
I have a really strange problem on a Windows XP workstation that read the data from a network drive hosted on Windows 2003 Server.
I - before to execute any procedure in my app - call the function CheckAccess(cFile) that is a simply function that try to open cFile in read/write mode to know if there are network connection problems.
This is the function :
function CheckAccess(cFile)
local nRetCode,handle,nError,cFile,lReturn
if file(cFile)
lReturn:=.t.
handle:=fopen(cFile,2+64)
nError:=ferror()
if nError>0
lReturn:=.f.
endif
fclose(handle)
if .not. lReturn
errore("Disk problem")
return(-1)
endif
endif
return(0)
The problem is that only on two workstation of six an error 5 (access denied) appairs making the test on a network file.
I made a lot of tests and the windows user can access to that file through Explorer and can rename and delete it.
I solved this problem casually simply adding SYSWAIT() at the beginning of that function.
My question:
Is this a FWH/xHarbor related problem or a Windows 2003 problem ?
I made a search on google and I seen some threads about random access denied problem on Windows 2003 server, is there anyone that have had the same problem ?
I am in doubt that solving the problem on this check routine I only move the problem directly on the next step (the DATA FILES) !!
Do I have to put a "syswait" before to open any files with FOPEN ?
Any ideas appreciated.
Thanks.
I have a really strange problem on a Windows XP workstation that read the data from a network drive hosted on Windows 2003 Server.
I - before to execute any procedure in my app - call the function CheckAccess(cFile) that is a simply function that try to open cFile in read/write mode to know if there are network connection problems.
This is the function :
function CheckAccess(cFile)
local nRetCode,handle,nError,cFile,lReturn
if file(cFile)
lReturn:=.t.
handle:=fopen(cFile,2+64)
nError:=ferror()
if nError>0
lReturn:=.f.
endif
fclose(handle)
if .not. lReturn
errore("Disk problem")
return(-1)
endif
endif
return(0)
The problem is that only on two workstation of six an error 5 (access denied) appairs making the test on a network file.
I made a lot of tests and the windows user can access to that file through Explorer and can rename and delete it.
I solved this problem casually simply adding SYSWAIT() at the beginning of that function.
My question:
Is this a FWH/xHarbor related problem or a Windows 2003 problem ?
I made a search on google and I seen some threads about random access denied problem on Windows 2003 server, is there anyone that have had the same problem ?
I am in doubt that solving the problem on this check routine I only move the problem directly on the next step (the DATA FILES) !!
Do I have to put a "syswait" before to open any files with FOPEN ?
Any ideas appreciated.
Thanks.