Re: ASP Database connection problem
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 04/29/04
- Next message: Ray at <%=sLocation%> [MVP]: "Re: automatic emails"
- Previous message: FX: "Re: utf8 encoding problems...please help"
- In reply to: Chris Barber: "Re: ASP Database connection problem"
- Next in thread: Chris Barber: "Re: ASP Database connection problem"
- Reply: Chris Barber: "Re: ASP Database connection problem"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 09:19:49 -0400
Chris Barber wrote:
> Dear gawd - I'd better go off and put the Dunces cap on - I even read
> all the posts and tried to not do that!
>
> Although - doesn't really matter in ASP VBScript does it - only
> Javascript cares about it since VBScript has no '\' escape character?
>
Hmm, I guess you're right. I could have sworn I received an error when using
backslashes in the past, but I've just tested it with this:
Response.Write server.MapPath("w2kmigration.mdb") & "<BR>"
Response.Write server.MapPath("..\test_Local\w2kmigration.mdb") & "<BR>"
Response.Write server.MapPath("../test_Local/w2kmigration.mdb") & "<BR>"
and got this result:
C:\Visual Studio Projects\test\test_Local\w2kmigration.mdb
C:\Visual Studio Projects\test\test_Local\w2kmigration.mdb
C:\Visual Studio Projects\test\test_Local\w2kmigration.mdb
In fact, this even worked (watch for line break - should be single line):
Response.Write server.MapPath(".\Visual Studio
Projects\test\test_Local\w2kmigration.mdb")
It isn't until I try to use the C: that I get the message I remember
getting:
Error Type:
Server.MapPath(), ASP 0172 (0x80004005)
The Path parameter for the MapPath method must be a virtual path. A physical
path was used.
I was thinking it used the slash-type to determine when a physical path was
being supplied. Learn something new every day ...
Bob
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: Ray at <%=sLocation%> [MVP]: "Re: automatic emails"
- Previous message: FX: "Re: utf8 encoding problems...please help"
- In reply to: Chris Barber: "Re: ASP Database connection problem"
- Next in thread: Chris Barber: "Re: ASP Database connection problem"
- Reply: Chris Barber: "Re: ASP Database connection problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|