T
TimS
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 from
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 (0x800A0035).
However, if explicitly specify the path and filename (as in path2 below)
then it works. If I use path1 then it does not work. path2 was taken by
printing path1 to the browser window and then cutandpaste into my code.
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 but an
apparently IDENTICAL string which is explicitly typed in DOES work? I am
certain that this data is correct and it is not just a problem of me doing
something stupid.
Help?
TimS
I am writing asp on a windows 2000 server. I build a path and filename from
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 (0x800A0035).
However, if explicitly specify the path and filename (as in path2 below)
then it works. If I use path1 then it does not work. path2 was taken by
printing path1 to the browser window and then cutandpaste into my code.
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 but an
apparently IDENTICAL string which is explicitly typed in DOES work? I am
certain that this data is correct and it is not just a problem of me doing
something stupid.
Help?
TimS