Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 5.0 Middle Tier Cannot Read UNC
Message
De
22/03/1999 09:53:24
Robert Byrd
National Association of Homebuilders
Washington, District de Colombia, États-Unis
 
 
À
19/03/1999 18:50:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00199506
Message ID:
00200449
Vues:
8
All right! It is starting to come together for me. Now, I need to get into the details as to how I can make this work for me.

Suppose I make a call to WNetAddConnection3 and get a NO_ERROR result. How do I subsequently use the connection created? If the return value is NO_ERROR then the call does not provide me with a connection handle. Does that mean that the UNC is the connection handle?

It seems that I just need to understand the interface with the resulting connection and, barring other detail snags, I should be able to put this into my existing middle tier code and test it.

MANY THANKS, Bob

>>If I am understanding your response correctlyu, my situation is would be the inverse of what you describe. I can access the UNC using Network Neighborhood, but my runtime code says the UNC does not exist.
>>
>
>Visibility of a share doesn't mean that you've been logged in and granted access to the content. Until you actually attach to the machine, and depending on the securuty, been authenticated, visibility means just that - you know it's there.
>
>>I am using the WIN32 API anyway, so another call to won't add any admin overhead. I might be able to figure out how to put in a test to see if it can make a difference.
>>
>>Thanks again.
>>
>>Bob
>>
>>
>>
>>>>I really appreciate your help and I KNOW that you are trying to help me. But I am getting way lost.
>>>>
>>>>Let's see if I can understand what is going on with this.
>>>>
>>>>I take it that if I use the WNetAddCOnnection3()that there is a presumption that something called a "connection" is missing and is required. How does this respond to my previous question concerning the fact that I can access the UNC from Network Neighborhood? What is this "connection" that is missing and how could a qualified UNC no longer qualify during runtime? Did a "connection" get dropped?
>>>>
>>>
>>>WNetAddConnection3 is an API call that is used to connect to network resources by name. There are any number of reasons that a UNC might not be visible in Network neighborhood; the share might be hidden, or your default peer-to-peer connection might not be using the right protocol to reach the other system. The API call may be able to connect even when you can't see it; there are plenty of times I've been able to connect to a share where i knew the name but it wasn't visible in network Neighborhood.
>>>
>>>Maybe you'd be better off having someone troubleshoot your network for you, so that you're more comfortable with how things appear.
>>>
>>>>I am having a hard time understanding how this is addressing my question.
>>>>
>>>>I apologize if I sound really ignorant, but I am. My knowledge of this topic is apparently very shallow.
>>>>
>>>>Talk to me like I'm stupid and maybe I can get it.
>>>>
>>>>Thanks again, Bob
>>>>
>>>>>>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
Database Development Team
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform