472,353 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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

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
5 4454
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered...
2
by: Pedro Carvalho | last post by:
I am using a WebClient.Upload File method (using the HTTP POST) on the Client side and, to accept posted files on the Server side, I am using an...
6
by: Omid | last post by:
Hi. I have problems when I try to redirect everything that is sent to cout to a file. I have one piece of code that works and one that does not...
12
by: Mike | last post by:
I have posted this before, but no one responds, so here it goes again. I think my question is intimidating people and I have no idea why?!? This is...
5
by: Mike Collins | last post by:
I am trying to export data from multiple tables in SQL Server to an XML file so I can then import it to another database. It seems to be working...
9
by: JimmyKoolPantz | last post by:
IDE: Visual Studio 2005 Language: VB.NET Fox Pro Driver Version: 9.0.0.3504 Problem: I currently have a problem altering a DBF file. I do not...
1
by: Holly | last post by:
We have a new server that runs 2003 and framework 2.0.50727. I put a simple asp.net application(one button on the default.aspx page) under wwwroot. ...
3
by: shapper | last post by:
Hello, Could someone tell me how to convert a XML file into another XML file using a XSL file with a parameter? I created the code to do it, and...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.