Why don't you just do a Response.Write on the path thats not working and see
what it actually contains?
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
TimS <tim.stoner@comcast.net> wrote in message
news:O4KRVq1yDHA.1688@TK2MSFTNGP10.phx.gbl...[color=blue]
> Steven,
>
> Re: your comment - the resulting path/filename variable is the same[/color]
whether[color=blue]
> the filename is inside or outside of the MapPath function.
>
> This is a problem which is not going to resolve from a syntax correction.
> All the relevent factors are contained in this paragraph. Basically, you
> have two variables, path1 and path2. If you test them, path1=path2 is[/color]
TRUE.[color=blue]
> path1 was created using the code illustrated below. path2 was created by
> printing path1 to the screen and then cut/pasting the path/filename string
> into my code. path1 and path2 appear to be identical. However, path1[/color]
gives[color=blue]
> a file not found error and path2 works, as shown in the code below.
>
> If you don't already know the answer, I wager you will not be able to[/color]
figure[color=blue]
> it out. I am hoping someone already knows the answer :-) ....please!
>
> TimS
>
> "Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
> news:eW3NCW1yDHA.1996@TK2MSFTNGP12.phx.gbl...[color=green]
> > Surely it should be.........
> >
> > path1=Server.MapPath(temp1 & "\" & temp2 & "\pics.ini")
> >
> > --
> > Regards
> >
> > Steven Burn
> > Ur I.T. Mate Group
> >
www.it-mate.co.uk
> >
> > Keeping it FREE!
> >
> > Disclaimer:
> > I know I'm probably wrong, I just like taking part ;o)
> >
> >
> > TimS <tim.stoner@comcast.net> wrote in message
> > news:ekl2bT1yDHA.2156@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > I am getting a baffling File not found error (0x800A0035).
> > >
> > > I am writing asp on a windows 2000 server. I build a path and filename[/color]
> > from[color=darkred]
> > > several fields in a jet database using SQL commands, like this:
> > >
> > > Sql = "SELECT dirs.rootname,dirs.dirname FROM dirs"
> > > RS.open Sql
> > > RS.movefirst
> > > do while not RS.EOF
> > > temp1=trim(RS("rootname"))
> > > temp2=trim(RS("dirname"))
> > > path1=Server.MapPath(temp1 & "\" & temp2) & "\pics.ini"
> > >
> > > When I try to open the file I get this file not found error[/color][/color]
> (0x800A0035).[color=green][color=darkred]
> > > However, if explicitly specify the path and filename (as in path2[/color][/color][/color]
below)[color=blue][color=green][color=darkred]
> > > then it works. If I use path1 then it does not work. path2 was taken[/color][/color]
> by[color=green][color=darkred]
> > > printing path1 to the browser window and then cutandpaste into my[/color][/color][/color]
code.[color=blue][color=green][color=darkred]
> > >
> > > Sql = "SELECT dirs.rootname,dirs.dirname FROM dirs"
> > > RS.open Sql
> > > RS.movefirst
> > > do while not RS.EOF
> > > temp1=trim(RS("rootname"))
> > > temp2=trim(RS("dirname"))
> > > path1=Server.MapPath(temp1 & "\" & temp2 & "\pics.ini")
> > > path2="C:\Inetpub\wwwroot\Tim & Janies Family Web Page\2003\pics.ini
> > > ' at this point path1=path2, this can be tested and proven
> > > set fs=Server.CreateObject("Scripting.FileSystemObject ")
> > > set f=fs.OpenTextFile(path2,1)
> > >
> > > Why does the path/filename string built using the database not work[/color][/color][/color]
but[color=blue]
> an[color=green][color=darkred]
> > > apparently IDENTICAL string which is explicitly typed in DOES work? I[/color][/color][/color]
am[color=blue][color=green][color=darkred]
> > > certain that this data is correct and it is not just a problem of me[/color][/color]
> doing[color=green][color=darkred]
> > > something stupid.
> > >
> > > Help?
> > >
> > > TimS
> > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]