help: few different access database location

  • Thread starter Thread starter Tee
  • Start date Start date
T

Tee

Hi,

I have a site that coded in ASP.NET with MS Access as database. The
connection string is also coded to the Access file location.

But now the problem is, I have to upload the same ASP.NET application to 2
server. And this 2 different server has different DB folder for us to put in
db files.

How can I upload it without changing the code, but let the program dynamic
select the file in DB folder.
eg: server 1 I use server.mappath("filename.mdb")
server 2 is at c:\db\filename.mdb

anyone can help ?

thanks,
Tee
 
Why don't you store the location of the database in your web.config file?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top