Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I can't connect to my data
Message
From
02/03/2000 08:45:08
 
 
To
02/03/2000 08:17:53
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00338312
Message ID:
00340488
Views:
27
>Hi Ed,
>
>please help my out here.
>
>I have use your routine demo_wnetaddconnection3, but how can I access the data??
>
>This is my line of code:
>? demo_wnetaddconnection3("J:","\\129.142.140.215\dbtest","dbtest","dbtest")
>*Returns a number > 0
>

If running under Win9x, you can't use an IP Address as a part of a UNC. You have to rely on LMHOSTS to map a NetBIOS name to the IP Address and use the NetBIOS name in the UNC. You must have the account "dbtest" with a password of "dbtest" on the target machine with rights to the predefined share \\machinename\dbtest

The value returned from the function is the API call error code, which you can look up to see what the error means; it's defined in WINERROR.H if nowhere else. The error code should indicate what you have wrong, and you have the source - there is no magic.

If the function returns 0, then the drive letter is mapped to the UNC as requested; if you've not mapped to a drive letter, your access to the UNC is authenticated, and the UNC is usable in a path.

It's in the PD with source so that you can make it work; I am not in a position to provide infinite support and modification to it for free. I do consulting on API and COM implementation for a living, so if you'd like to hire a consultant to do your work for you, you're welcome to hire me...
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
Reply
Map
View

Click here to load this message in the networking platform