if session("rootDir") = "" then
dim str
str = Server.MapPath("db")
session("rootDir") = Mid(str, 1, InStr(1, str, "MySite", 1) - 1) & "MySite\db"
end if
...
Set conn = Server.CreateObject("adodb.connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & session("rootDir") & "\db1.mdb" & ";pwd=" & pw |