Ted, I have had similar problems with mapped drives. Have you tried using the full unmapped name:
Example: \\server1\folder1\file1.dbf With regards to the red X, once again you will find that these will all be mapped drives. It is as though windows temporarily forgets the mappings and goes into sleep mode. Since using fully qualified paths we have had no problems. Dave -----Original Message----- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Ted Roche Sent: 06 May 2015 13:44 To: profox@leafe.com Subject: Delay in USEing table on network causes errors, using VMs, Win7 Folks: We have a small VFP exe that launches as a scheduled tasks, ZAPs a temp table, checks to see if a table on the network has records, performs some text manipulation, updates records and exits. Been working fine for decades on a number of sites. One new network config on one client is throwing errors. The exe is running on a VM within a larger server. The main server has the files it accesses, mapped as a U: drive. The exe attempts to open a DBF exclusive, ZAP it and then do some processing that might populate it with records. It's run as part of a batch process that's initiated by a user RDP'ing into the machine. It's failing. When we run the .exe manually from the file explorer, we get an error that "U:\Directory\tablename.dbf" can't be found. If we select <Ignore>, it attempts the ZAP and brings up a file locator dialog. If we navigate manually to the file (it correctly opens in U:\Directory\), select the Exclusive and Open it, the process runs successfully to completion. Running the exe again at that point, and it will work fine without throwing an error! It's only on the first initiation. We're thinking this is a problem with the U: drive mapping timing out and *something* being needed to get the connection to work. We've tried a: IF NOT FILE("U:\Directory\Tablename.dbf") wait timeout 30 ENDIF and the error still happened the same way, so querying with FILE() doesn't seem to be enough to trigger the reconnection. Walking through the process again, we noted a red "X" on the U: drive in the explorer. Clicking on it clears the red "X" and the process will work fine from there. Does anyone know a programmatic way to clear the red "X" and re-establish the network connection? I was sure I'd see something in the mailing list archives on this, but my searches didn't turn up anything. -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab246b31...@ex2010-a-fpl.fpl.LOCAL ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.