Home All Groups Group Topic Archive Search About


Author
12 Mar 2006 6:37 PM
MikeR
My ISP has parent paths disabled, and my local box does not. I'd like to
be able to tell where a page is executing so I can code an if statement
for my db connection strings.

if RunningOnThag then
   Server.MapPath("../fpdb/materiale.mdb")
else
   Server.MapPath("/fpdb/materiale.mdb")
end if

TIA,
Mike

Author
12 Mar 2006 7:26 PM
Bob Barrows [MVP]
MikeR wrote:
> My ISP has parent paths disabled, and my local box does not. I'd like
> to be able to tell where a page is executing so I can code an if
> statement for my db connection strings.
>
> if RunningOnThag then
>   Server.MapPath("../fpdb/materiale.mdb")
> else
>   Server.MapPath("/fpdb/materiale.mdb")
> end if
..
Request.ServerVariables("SERVER_NAME")

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Author
12 Mar 2006 7:31 PM
Bob Lehmann
Request.ServerVariables("Server_Name")

Bob Lehmann

Show quote
"MikeR" <nf4lNoSpam@pobox.com> wrote in message
news:exk25PgRGHA.2300@TK2MSFTNGP11.phx.gbl...
> My ISP has parent paths disabled, and my local box does not. I'd like to
> be able to tell where a page is executing so I can code an if statement
> for my db connection strings.
>
> if RunningOnThag then
>    Server.MapPath("../fpdb/materiale.mdb")
> else
>    Server.MapPath("/fpdb/materiale.mdb")
> end if
>
> TIA,
> Mike
>
>
Author
12 Mar 2006 10:44 PM
MikeR
Thanks Bobs. Works a charm.
Mike

AddThis Social Bookmark Button