Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE with UNC
Message
 
 
To
09/08/2000 14:01:08
Steve Summers
Pima County Superior Court
Tucson, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00402915
Message ID:
00403017
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform