Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5.0 Middle Tier Cannot Read UNC
Message
From
19/03/1999 15:14:11
 
 
To
19/03/1999 08:37:15
Robert Byrd
National Association of Homebuilders
Washington, District of Columbia, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00199506
Message ID:
00199939
Views:
15
>THANKS for the response.
>
>The UNC that is being accessed (\\MTX1\LM2) maps to the physical machine that is the middle tier. I can go to the console of that machine and open that UNC via Network Neighborhood. I just cannot fathom how there could be no "attachment" at runtime. To me it looks like some sort of hiccup in VFP 5.0.
>
>I cannot use a drive mapping because I have Crystal Reports called from the front-end that use the datapath as a UNC to get the DBF for the report form. If I were to use a drive mapping such as "C:\LM2", the client would be looking on the workstation's C drive for the DBF instead of on the middle tier's C drive.
>

If you map a drive, you can retrieve the UNC that equates to it. Look back a day or two at the messages - I posted some code for Bruce that made the necessary API call to convert a mapped drive letter to a UNC.

>I am not even vaguely familiar with "NETRSC". Maybe you could help me out by pointing me to it.
>

NETRSC.ZIP is available for download here on UT in the FIles Section. It relies on another class that I wrote, CLSHEAP, to permit it to implement and manipulate NETRESOURCE structures, which are used by many of the WNet family of API calls. One of the demo programs in NETRSC is DEMO_WNetAddConnection3(), which uses NETRSC to implement the WNetAddCOnnection3() API call, which can attach a share without mapping a drive.

Both CLSHEAP.ZIP and NETRSC.ZIP are available here.

>Thanks again,
>Bob
>
>
>>>I have an out of process VFP executable that functions a middle tier with a VB 6.0 front-end.
>>>
>>>My app allows the user to choose which middle tier machine to use.
>>>
>>>When I run the app on bbyrd and select bbyrd as the middle tier I get no error. But when I run the app and select MTX1 as the middle tier I get an error in my error log that "\\mtx1\lm2\data\lm2.d*" does not exist.
>>>
>>>The line of code that is executing is trying to copy a DBC set of files. The EXACT same code works fine locally.
>>>
>>>The actual UNC string is being picked up from an INI file.
>>>
>>>
>>>What could be causing the remote middle tier to not see the qualified UNC. I have checked the UNC against what the remote middle tier machine can actally see and it should work.
>>>
>>
>>It's likely that there's no current attachment to the target system at the mid-tier server. You might want to either premap a drive on that system, or take a look at NETRSC (you'll need NETSC.ZIP and CLSHEAP.ZIP) and adapt the sample DEMO_WNetAddConnection3 code to force a connection to the target server without first mapping a drive.
>>
>>>I think I have really done a VERY thorough job of eliminating most of the obvious suspects. What do you think?
>>>
>>>Call me Loony in Lanham,
>>>
>>>Bob
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform