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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying path in connection string

Status
Not open for further replies.

takwirira

Programmer
Mar 6, 2007
23
GB
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("db2.mdb")

My connection string looks as above.

i have uploaded the site to the web server in a folder called Register. Register is in the root folder. However there is a folder called Search in which some aspx pages will need access to that same database.

My question is, how do I change the connection string to access the database either in the Register folder or in the root.

Thanks

Illustration

\Root
--Register
register.aspx
db2.mdb

--Search
search.aspx ****Search needs access to db2.mdb !! OR I can put db2.mdb in the root but I still wouldnt know how to put in the connection string.


I managed to do this on my local pc using the full file paths but this is not possible on the web server


Before you ask, I cant put them in the same folder because of the web config files because im using forms authentication.

Your help is greatly appreciated.

Thanks
 
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("/Register/db2.mdb")

this has now been resolved
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top