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!

ASP.NET UNC connection string in C#

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#.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top