Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE with UNC
Message
 
 
À
09/08/2000 14:01:08
Steve Summers
Pima County Superior Court
Tucson, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00402915
Message ID:
00403017
Vues:
18
>I am getting an error message that the UNCPATH + table name does not exist. I checked my access rights on the Novel server and I can see the table, but when I run the code it errors out on the USE line. It seems like a timing issue because if I map a drive to the directory where the file resides the code runs fine.
>
>Has anyone ever dealt with this before?

Modifying the API I found in the UT API Library, the following works on Novell drives. However, it is slow removing the map [at least on my machine].
procedure CreateMap

DECLARE INTEGER WNetAddConnection IN mpr.dll ;
	STRING cRemoteName, ;
	STRING cPassword, ;
	STRING cLocalName

cResource = "\\R6rbs01\Vol2\Apps\Water"
cPassword = chr(0)  && important distinction from the original
cDriveLetter = "Q:"
lnRetVal = WNetAddConnection(cResource, cPassword, cDriveLetter)
return (lnRetval = 0)


procedure RemoveMap
*
DECLARE INTEGER WNetCancelConnection IN mpr.dll ;
	STRING cName, ;
	INTEGER nForce

local nForce, lnRetval

&& nForce can be 0 or 1. 1 = Force the disconnect, even if files are open
&& in my testing, the drive mapping was removed regardless of this setting.

lnRetVal = WNetCancelConnection("Q:", 0)
return (lnRetval = 0)
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform