PDA

View Full Version : Get path to Access DB


Antonby
04-16-2005, 05:35 AM
I have a .NET project that uses a web.config setting that contains a connect string to my Access database.
This approach works fine on my local pc, however when I moved the project to this hosting site, it says it cannot connect to the database. I put the database in the _database directory. I tried local paths like: /_database/mydb.mdb and \_database\mydb.mdb and so forth to no avail....

Can you help?

steurm
04-17-2005, 12:05 PM
If you store it in your web.config file, then use the complete reference to the database. You can find this reference in the control panel at discountasp.net.


Go to Account Management > Account Information


Here you'll find the Server path : e.g. e:\web\_myaccountname\htdocs, so the reference to your database will be e:\web\_myaccountname\htdocs\_database\mydb.mdb

--
Steurm
www.steurm.net/steurm (http://www.steurm.net/steurm)
http://www.steurm.net/steurm/imgs/steurm_small.gif