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!

Using a variable in Server.MapPath

Status
Not open for further replies.

KingElvis

Programmer
Jan 28, 2004
39
0
0
IL
Can one use a variable in the Server.MapPath definition? And if so, what would the correct syntax be?

I have a line of code that reads:

strDBPath = Server.MapPath("..\..\db\masterdb.mdb")


I want to use a variable for the db file name eg:


currentDb = masterdb.mdb


 
Something like:
currentDb = "masterdb.mdb"
strDBPath = Server.MapPath("..\..\db\" & currentDb)


[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top