Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem moving from mapped drives to UNC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00100857
Message ID:
00101094
Vues:
46
>>>>"\:\\FS_RENAL2\USER1\APPS\DB\MAIN\DATABASE\PATDB.DBC does not exist."
>>>
>>>Would this work:
>>>
>>>set default to \\FS_RENAL2\USER1\APPS\DB\MAIN
>>>use database\atable.dbf
>>>use database\another.dbf
>>>use database\thisone.dbf
>>>
>>>Note default does NOT start with \:
>>
>>Precisely. The problem would be the \: at the beginning.
>
>Hi everyone. I don't want to encode the server and path into the application (if I can at all help it) so that the app can be moved without much of a fuss.
>
>I have set up a shortcut on my desktop which has:
>Target: \\Fs_renal2\USER1\APPS\DB\MAIN\VMAIN.EXE
>Start in: \\Fs_renal2\USER1\APPS\DB\MAIN\
>
>The application start but once it trys to open the first table or database, I get the following error when the following line is executed
>
>open database database\patdb shared in 0
>
>Error message:
>
>File '\:\\FS_RENAL2\USER1\APPS\DB\MAIN\DATABASE\PATDB.DBC' does not exist.
>
>The path looks correct in the error message except for the \: part.
>
>Anyone got any ideas what may be causing the error?

The only time I've seen that is when someone built a path based on SYS(5) + <>. I use a codearound to avoid this in some of my apps where I may be running on a UNC, a local drive, or a mapped drive:

LOCAL cMyDefaultPath
cMyDefaultPath = SYS(2003)
IF LEFT(cMyDefaultPath,2)#'\\'
cMyDefaultPath = SYS(5) + cMyDefaultPath
ENDIF
CD (cMyDefaultPath)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform