Jump to content
  • Advertisement
Sign in to follow this  
ChemicalImbalance

[web] ASP.NET - Specifying online directories

This topic is 4301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to connect to a database on my website. It works great locally, but when I post it online, it keeps grabbing the wrong directory. The correct path is "\user\access_db\Catalog.mdb" My host does not tell me what drive letter or anything else that it's under. When I specify that path, it assumes that I must mean "c:\user\access_db\Catalog.mdb" and promptly tells me that it can't find the file. Is there a better way to specify the path? Here's the full exception that it's returning: System.Data.OleDb.OleDbException: 'c:\user\access_db\Catalog.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. And here's the line I'm using to connect to the database:
dbconn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\user\access_db\Catalog.mdb");


Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!