Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't access a table on the LAN
Message
 
To
24/07/2003 14:14:45
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00813094
Message ID:
00813205
Views:
10
Glad that worked.

>OK, the UNC path worked. Thank you very much.
>
>Jerry
>
>
>
>>Hi Jerry,
>>
>>You need to use a UNC path instead of a mapped path to the data. Also, if you are still having troubles after you make that change then it could be a rights issue since you are ruhning under the ASPNET account. See thread #742132 for a situation similar to yours about how to change the rights if needed.
>>
>>>Using .NET 2003, I am creating a Webform that access a VFP free table.
>>>
>>>If my connection string points to a table on my hard drive, I can successfully query and display the data in my web form.
>>>
>>>However, if I change the connection string to point to a copy of the same table on our LAN, I get the following error when I run my Webform.
>>>
>>>Server Error in '/mydir' Application.
>>>--------------------------------------
>>>Invalid path or file name.
>>>blah, blah, blah
>>>
>>>
>>>Here's the code behind my Webform's button:
>>>
>>>///My command button click event.
>>>
>>>//Points to the network table.
>>>string lc_ConnectionString = "Provider=VFPOLEDB.1;Data " +
>>>      "Source=f:\\data\\;Mode=ReadWrite|Share Deny None";
>>>//Points to the copy on my hard drive. This does work.
>>>//string lc_ConnectionString = "Provider=VFPOLEDB.1;Data " +
>>>      "Source=c:\\apps\\;Mode=ReadWrite|Share Deny None";
>>>
>>>string SelectCmd = "SELECT employee.em_key, employee.em_userid, " +
>>>		"employee.em_fulname, employee.em_email " +
>>>		"FROM employee ";
>>>
>>>DataSet ds = new DataSet();
>>>
>>>OleDbDataAdapter DataAdapter = new OleDbDataAdapter(SelectCmd, lc_ConnectionString);
>>>
>>>DataAdapter.Fill(ds);
>>>
>>>grd_employee.DataSource = ds;
>>>grd_employee.DataBind();
>>>
>>>
>>>My dev PC is a WinXP Pro. I have Admin rights to our LAN.
>>>
>>>What can I do to allow my Webform to access a table on our LAN?
>>>
>>>Thanks,
>>>
>>>Jerry
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform