By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

baffling 'file not found' error. I dare someone to solve this!

P: n/a
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

Jul 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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 <ti********@comcast.net> wrote in message
news:ek**************@TK2MSFTNGP09.phx.gbl...
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

Jul 19 '05 #2

P: n/a
Steven,

Re: your comment - the resulting path/filename variable is the same whether
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 TRUE.
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 gives
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 figure
it out. I am hoping someone already knows the answer :-) ....please!

TimS

"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
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 <ti********@comcast.net> wrote in message
news:ek**************@TK2MSFTNGP09.phx.gbl...
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


Jul 19 '05 #3

P: n/a
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 <ti********@comcast.net> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
Steven,

Re: your comment - the resulting path/filename variable is the same whether 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 TRUE. 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 gives 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 figure it out. I am hoping someone already knows the answer :-) ....please!

TimS

"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:eW**************@TK2MSFTNGP12.phx.gbl...
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 <ti********@comcast.net> wrote in message
news:ek**************@TK2MSFTNGP09.phx.gbl...
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



Jul 19 '05 #4

P: n/a
TimS wrote:
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
How?
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?


Have you done a
Response.Write path1 & "<BR>" & path2
to make sure that they are identical?

--
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"
Jul 19 '05 #5

P: n/a
On Thu, 25 Dec 2003 18:06:17 -0800, "TimS" <ti********@comcast.net>
wrote:
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.


We're not that certain, you'll have to prove it. Post a
Response.Write of Path1...

Jeff
Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.