VFP9SP2 - Citrix/VMWare server, Win10 desktop image on client
My error handling tripped on this simple line:
INSERT INTO broker!doclinks (ifileid,idoctypeid,crange) VALUES (thisform.oFile.iid,liDocTypeID,ALLTRIM(loObj.txtRange.value))
VFP Help says this about Error 108:
Visual FoxPro 9.0 SP2
File is in use by another user (Error 108)
You have attempted a USE, DELETE, or RENAME command on a file that is being used by another user on a network.
I don't see why this line of code would throw an Error 108. I guess I'll add a simple TRY/CATCH around it to retry it "N" number of times (via DO WHILE loop with flag and counter), but tossing this out to the group for your thoughts.
Thanks, --Mike
On 12/15/2020 12:59 PM, MB Software Solutions, LLC wrote:
VFP9SP2 - Citrix/VMWare server, Win10 desktop image on client
My error handling tripped on this simple line:
INSERT INTO broker!doclinks (ifileid,idoctypeid,crange) VALUES (thisform.oFile.iid,liDocTypeID,ALLTRIM(loObj.txtRange.value))
VFP Help says this about Error 108:
Visual FoxPro 9.0 SP2 File is in use by another user (Error 108) You have attempted a USE, DELETE, or RENAME command on a file that is being used by another user on a network.
I don't see why this line of code would throw an Error 108. I guess I'll add a simple TRY/CATCH around it to retry it "N" number of times (via DO WHILE loop with flag and counter), but tossing this out to the group for your thoughts.
Thanks, --Mike
I wrapped this code around it:
*** mjb 12/15/2020 - added try/catch and retry attempts llPass = .F. liTries = 0 DO WHILE NOT llPass AND liTries < 10 TRY liTries = liTries + 1 INSERT INTO broker!doclinks (ifileid,idoctypeid,crange) VALUES (thisform.oFile.iid,liDocTypeID,ALLTRIM(loObj.txtRange.value)) llPass = .T. CATCH TO loException WHEN loException.ErrorNo = 108 WAIT WINDOW TIMEOUT 1 "Unable to insert document link. Reattempting " + ALLTRIM(STR(10-liTries)) + " more times..." INKEY(2) && wait 2 seconds CATCH TO loException oUtils.Alert(loException.Message,16,"Problem inserting doc link") ENDTRY ENDDO && WHILE NOT llPass AND liTries < 10
Error 108?
Assuming it's intermittent:
Someone else has it open exclusively.
Citrix\RDP scenario - are there 'ghost' instances of your EXE still running on the server from remote user sessions that didn't terminate properly, that might have the file open ?
On-access antivirus scan is having a look at the DBF.
Windows Indexing service on some versions of Windows Server is having a look at the DBF.
Continuous online backup software like Mozypro is having a look at the DBF.
When it happens I would tend to hop onto the server and have a look at what sessions have what files open.
Wild guess: Use myFile shared Koen
Op di 15 dec. 2020 om 19:00 schreef MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com>
VFP9SP2 - Citrix/VMWare server, Win10 desktop image on client
My error handling tripped on this simple line:
INSERT INTO broker!doclinks(ifileid,idoctypeid,crange) VALUES (thisform.oFile.iid,liDocTypeID,ALLTRIM(loObj.txtRange.value))
VFP Help says this about Error 108:
Visual FoxPro 9.0 SP2 File is in use by another user (Error 108)You have attempted a USE, DELETE, or RENAME command on a file that is being used by another user on a network.
I don't see why this line of code would throw an Error 108. I guess I'll add a simple TRY/CATCH around it to retry it "N" number of times (via DO WHILE loop with flag and counter), but tossing this out to the group for your thoughts.
Thanks, --Mike
-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]