473,672 Members | 3,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(temp1 & "\" & temp2 & "\pics.ini" )
path2="C:\Inetp ub\wwwroot\Tim & Janies Family Web Page\2003\pics. ini
' at this point path1=path2, this can be tested and proven
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
set f=fs.OpenTextFi le(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 4584
Surely it should be.........

path1=Server.Ma pPath(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********@com cast.net> wrote in message
news:ek******** ******@TK2MSFTN GP09.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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(temp1 & "\" & temp2 & "\pics.ini" )
path2="C:\Inetp ub\wwwroot\Tim & Janies Family Web Page\2003\pics. ini
' at this point path1=path2, this can be tested and proven
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
set f=fs.OpenTextFi le(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_i t-mate.co.uk> wrote in message
news:eW******** ******@TK2MSFTN GP12.phx.gbl...
Surely it should be.........

path1=Server.Ma pPath(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********@com cast.net> wrote in message
news:ek******** ******@TK2MSFTN GP09.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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(temp1 & "\" & temp2 & "\pics.ini" )
path2="C:\Inetp ub\wwwroot\Tim & Janies Family Web Page\2003\pics. ini
' at this point path1=path2, this can be tested and proven
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
set f=fs.OpenTextFi le(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********@com cast.net> wrote in message
news:O4******** ******@TK2MSFTN GP10.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_i t-mate.co.uk> wrote in message
news:eW******** ******@TK2MSFTN GP12.phx.gbl...
Surely it should be.........

path1=Server.Ma pPath(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********@com cast.net> wrote in message
news:ek******** ******@TK2MSFTN GP09.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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(temp1 & "\" & temp2 & "\pics.ini" )
path2="C:\Inetp ub\wwwroot\Tim & Janies Family Web Page\2003\pics. ini
' at this point path1=path2, this can be tested and proven
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
set f=fs.OpenTextFi le(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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS(" rootname"))
temp2=trim(RS(" dirname"))
path1=Server.Ma pPath(temp1 & "\" & temp2 & "\pics.ini" )
path2="C:\Inetp ub\wwwroot\Tim & Janies Family Web Page\2003\pics. ini
' at this point path1=path2, this can be tested and proven
How?
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
set f=fs.OpenTextFi le(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********@com cast.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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS( "rootname") )
temp2=trim(RS( "dirname"))
path1=Server.M apPath(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,d irs.dirname FROM dirs"
RS.open Sql
RS.movefirst
do while not RS.EOF
temp1=trim(RS( "rootname") )
temp2=trim(RS( "dirname"))
path1=Server.M apPath(temp1 & "\" & temp2 & "\pics.ini" )
path2="C:\Inet pub\wwwroot\Tim & Janies Family Web Page\2003\pics. ini
' at this point path1=path2, this can be tested and proven
set fs=Server.Creat eObject("Script ing.FileSystemO bject")
set f=fs.OpenTextFi le(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
3199
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 by the underlying operating system. This is indeed also true for our language of choice, Python. Its file type allows some extraordinary convenient access like: for line in open("blah"): handle_line(line)
2
5592
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 ASP.NET page with the following code: void Page_Load(object sender, EventArgs e) { foreach(string f in Request.Files.AllKeys) { HttpPostedFile file = Request.Files; file.SaveAs("c:\\WUTemp\\" + file.FileName);
6
21056
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 work. The only difference is which headers I use. What the code does: * First writes "This is sent to prompt" to prompt.
12
1508
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 not a new concept. You can do this with other programming languages, so why is C# so different? Again, here is my baffling C# question. I have C# code that opens an application, but right after it opens I am confronted by prompts for information (i.e. "Please enter your id"). I would like to...
5
2170
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 fine for exporting, but I am having trouble importing the file. I am getting the following error trying to import the same xml file I just exported. "System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'GetTprsForExport'. Can someone show me where I am going wrong. Even though I say...
9
8383
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 get any syntax errors when running the program. However, after I alter the table and open microsoft excel to look at any changes; I get the following error: "This file is not in a recognizable format" If I do open the file in excel it looks like its not formatted.
1
1202
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. from IIS manager, I can see the application fine. But when I trying to access the default.aspx, (even by right click on the default.aspx inside IIS manager then "Browse") I got "file not found error". If I try to access an html file under the site it will be ok. Could someone give me an idea...
3
3153
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 it seems ok, but it is not working. Could somebody, please, help me out? I am on this for days. My code is as follows:
0
8419
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8945
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8696
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4239
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4439
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2092
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1836
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.