Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# UNC path to an Access database

Status
Not open for further replies.

drepp

Programmer
Jan 29, 2003
7
US
I'm working on a C# ASP.NET app, and I'm having a problem with a connection string to an Access database. All of the examples I can find online se either server.mappath or the physical drive letter. However, all I have to work with in this case is a UNC path. What should the syntax for the connection string look like?

I tried "DATA Source=\\server\\dir\\dir\\file.mdb" but it keeps trying to resolve that down to "c:\server\dir\dir\file.mdb" as if the server was a directory!

So, please help! :) How do I get a UNC path to work as a data source path? I can do this in VB with "\\server\dir\dir\file.mdb", but I can't seem to figure out the similar code for C#.
 
You may want to try this forum:
forum855
________________________________________________________________________________
Sometimes it is how you ask the question: faq333-2924
Many ASP questions have already been answered, please check faq333-3048 and use the search tool before posting
 
or this one:
forum732
________________________________________________________________________________
Sometimes it is how you ask the question: faq333-2924
Many ASP questions have already been answered, please check faq333-3048 and use the search tool before posting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top