Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with pathing
Message
De
17/07/2007 20:17:38
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01241003
Message ID:
01241358
Vues:
30
>This never fails on the Novell server, but fails on the Windows 2003 server.
>This is what is in the properties of the shortcut on the user's desktop.
>The full path to the 2003 server application is:
>
\\FileServer\NewShopLink\ShopLink.exe
>Any ideas about how to get around this?

It should work... which VFP version? VFP6sp3 is the last one with problems with UNCs, IIRC.

Though, can you insert a check just to see what's the path just before trying to open the dbc?

Just noticed something... if you're at \\FileServer\NewShopLink, you are at the root of the share. Where did you expect to be when you do "cd .."? Or is it just some development time setting?

Also, I wouldn't entirely rely on the relative paths staying the same all the time - maybe something causes your app to change directories at some point. Some printer drivers do that. How about this:
Local lcSys16, lcProgram,lcDefaDir
lcSys16 = SYS(16)
*-- when running off an UNC, there's no colon in the path...
*-- not sure what the path would actually be - check this:
if ":"$lcSys16
   lcProgram = SUBSTR(lcSys16, AT(":", lcSys16) - 1)
else
   lcProgram = SUBSTR(lcSys16, AT("\\", lcSys16))
endif

Cd (justpath(lcProgram))
If justext(lcProgram) = "FXP"
   Cd ..
Endif
*-- full path here, curdir() doesn't return the drive part
lcDefaDir=fullpath(curdir())
set default to (lcDefaDir)
do addpath with "BCDE"
do addpath with "DATA"
do addpath with "FORMS"
do addpath with "GRAPHICS"
do addpath with "LIBS"
do addpath with "MENUS" 
do addpath with "PICTS" 
do addpath with "PROGS" 
do addpath with "QUERS"
do addpath with "REPORTS"
do addpath with "SCRNS"
do addpath with "SYSTEM"

Proc addpath
Lparam cPath
cPath=Fullpath(Addbs(cPath))
If Dire(cPath)
	If Atc(cPath+',', Set('path')+',')=0
		cPath=Set('path')+','+cPath
		Set Path To (cPath)
	Endif
Endif

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform