hi,
as you have got no Answer yet i try to give some "Keywords" about DOS ERROR 59
> the folder is shared and mapped as a network drive, user with full access to the folder.
i guess you are still using "Drive Letter" with Lanmanager over UPD Port 135-139 ( Check Network-Resource on Server )
since Windows Vista it is recommend to use UNC-Path ( \\Server\MyFolder ) instead of Drive Letter
why ?
UDP Ports are "closed" by Windows 10 while it have "Security Problem" ... but it still work "local" and in Network.
those Port will be "closed" after "Time-out" and SMB-11 does not "re-connect"
newer PC have "Energy-Saving" so Network-Card will go "sleep"
now SMB-2, over Port 445, include "Authentication" with every IP-Packet so it will "login" after "awake" (need Time) from "Sleep"
Sample :
make a *.LNK from File ( *.DOCx, *.XLSx, *.TXT ) on Server and send Shortcut to Desktop
Dblclick on *.LNK will open File even you have not touch Server before
--- todo :
DISABLE on every PC SMB-1 ( Apps -> "Program and Features" -> "Windows Features" -> SMB 1.0 / CIFS )
do not use "old Style" with Drive-Letter and SMB1
instead of
cDBF := "X:DUMMY.DBF"
use
cDBF := "\\192.168.XXX.XXX\DUMMY.DBF"
USE (cDBF) VIA ...
IF NetErr()
always check for NetErr()
"thiink" of "time-out" or "connection lost" ( e.g. Wifi )
use DBF in "share" Mode only "as long as need" ( Opportunistic Locking )
https://docs.microsoft.com/en-us/windows/win32/fileio/opportunistic-locksas SMB-2 have a "local Cache"
it is recommend to set
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters
FileInfoCacheLifetime
FileNotFoundCacheLifetime
DirectoryCacheLifetime
to "0" ( Zero ) to disable SMB-2 "local Cache"
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-7/ff686200(v=ws.10)?redirectedfrom=MSDNp.s not need when local Folder is "shared" in Network
--- Check SMB Connection
as i say check Ports of Resource-Monitor on Server ( Perfmon.exe /res -> Network -> TCP )
SMB1 default is not installed in Windows 10 but when have "upgrade" from older OS it is still active
you can enable Log on Server using Powershell :
Set-SmbServerConfiguration -AuditSmb1Access $true
than open DBF on Server and e.g APPEND Record from ( large ) CSV and watch on which Port you got Traffic
later you can check for Event 3000 in System Logfile with „Microsoft-Windows-SMBServer\Audit“
than you can "identify" which Workstation is still using SMB1
...
hope those Tips help you
Jimmy