473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Could not find file Error

Can anyone tell me why the below code returns error?
Exception Details: System.IO.FileNotFoundException: Could not find
file

Dim strLFolder As String = "c:\Temp\F Files"
Dim intClientID As Integer = 1221

Dim XMLStr As String = strLFolder & "\" &
intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
Dim dsPubs As New DataSet
dsPubs.ReadXml(XMLStr)

where as the below code is working

Dim dsPubs As New DataSet
dsPubs.ReadXml("c:\temp\F Files\1221\Lk
\HeaderTrailerDeltails_data.xml")
Thanks

Jul 23 '07 #1
5 4867
On Jul 23, 1:31 pm, Amritha.Da...@gmail.com wrote:
Can anyone tell me why the below code returns error?
Exception Details: System.IO.FileNotFoundException: Could not find
file

Dim strLFolder As String = "c:\Temp\F Files"
Dim intClientID As Integer = 1221

Dim XMLStr As String = strLFolder & "\" &
intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
Dim dsPubs As New DataSet
dsPubs.ReadXml(XMLStr)

where as the below code is working

Dim dsPubs As New DataSet
dsPubs.ReadXml("c:\temp\F Files\1221\Lk
\HeaderTrailerDeltails_data.xml")

Thanks
Any response please?

Jul 23 '07 #2
if the full path is going to be hardcoded, why bother with all the
concatenation??
<Am***********@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
On Jul 23, 1:31 pm, Amritha.Da...@gmail.com wrote:
>Can anyone tell me why the below code returns error?
Exception Details: System.IO.FileNotFoundException: Could not find
file

Dim strLFolder As String = "c:\Temp\F Files"
Dim intClientID As Integer = 1221

Dim XMLStr As String = strLFolder & "\" &
intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
Dim dsPubs As New DataSet
dsPubs.ReadXml(XMLStr)

where as the below code is working

Dim dsPubs As New DataSet
dsPubs.ReadXml("c:\temp\F Files\1221\Lk
\HeaderTrailerDeltails_data.xml")

Thanks

Any response please?
Jul 23 '07 #3
On Jul 23, 3:16 pm, "S Moran" <s...@moran.comwrote:
if the full path is going to be hardcoded, why bother with all the
concatenation??

<Amritha.Da...@gmail.comwrote in message

news:11**********************@g4g2000hsf.googlegro ups.com...
On Jul 23, 1:31 pm, Amritha.Da...@gmail.com wrote:
Can anyone tell me why the below code returns error?
Exception Details: System.IO.FileNotFoundException: Could not find
file
Dim strLFolder As String = "c:\Temp\F Files"
Dim intClientID As Integer = 1221
Dim XMLStr As String = strLFolder & "\" &
intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
Dim dsPubs As New DataSet
dsPubs.ReadXml(XMLStr)
where as the below code is working
Dim dsPubs As New DataSet
dsPubs.ReadXml("c:\temp\F Files\1221\Lk
\HeaderTrailerDeltails_data.xml")
Thanks
Any response please?
Actually full path should not me hard coded in the program. What my
intention was it was working when I hard code and it was not working
when I use concatenations.
Jul 23 '07 #4
then something is not translating properly. put in a bunch of message box
statements to examine the values of each part of the string... im sure youll
find something. probably has to do with the integer portion

<Am***********@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
On Jul 23, 3:16 pm, "S Moran" <s...@moran.comwrote:
>if the full path is going to be hardcoded, why bother with all the
concatenation??

<Amritha.Da...@gmail.comwrote in message

news:11**********************@g4g2000hsf.googlegr oups.com...
On Jul 23, 1:31 pm, Amritha.Da...@gmail.com wrote:
Can anyone tell me why the below code returns error?
Exception Details: System.IO.FileNotFoundException: Could not find
file
> Dim strLFolder As String = "c:\Temp\F Files"
Dim intClientID As Integer = 1221
> Dim XMLStr As String = strLFolder & "\" &
intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
Dim dsPubs As New DataSet
dsPubs.ReadXml(XMLStr)
>where as the below code is working
> Dim dsPubs As New DataSet
dsPubs.ReadXml("c:\temp\F Files\1221\Lk
\HeaderTrailerDeltails_data.xml")
>Thanks
Any response please?

Actually full path should not me hard coded in the program. What my
intention was it was working when I hard code and it was not working
when I use concatenations.

Jul 23 '07 #5
On Jul 23, 3:52 pm, "S Moran" <s...@moran.comwrote:
then something is not translating properly. put in a bunch of message box
statements to examine the values of each part of the string... im sure youll
find something. probably has to do with the integer portion

<Amritha.Da...@gmail.comwrote in message

news:11**********************@57g2000hsv.googlegro ups.com...
On Jul 23, 3:16 pm, "S Moran" <s...@moran.comwrote:
if the full path is going to be hardcoded, why bother with all the
concatenation??
<Amritha.Da...@gmail.comwrote in message
>news:11**********************@g4g2000hsf.googlegr oups.com...
On Jul 23, 1:31 pm, Amritha.Da...@gmail.com wrote:
Can anyone tell me why the below code returns error?
Exception Details: System.IO.FileNotFoundException: Could not find
file
Dim strLFolder As String = "c:\Temp\F Files"
Dim intClientID As Integer = 1221
Dim XMLStr As String = strLFolder & "\" &
intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
Dim dsPubs As New DataSet
dsPubs.ReadXml(XMLStr)
where as the below code is working
Dim dsPubs As New DataSet
dsPubs.ReadXml("c:\temp\F Files\1221\Lk
\HeaderTrailerDeltails_data.xml")
Thanks
Any response please?
Actually full path should not me hard coded in the program. What my
intention was it was working when I hard code and it was not working
when I use concatenations.
How stupid I am...

I was a spelling mistake. HeaderTrailerDeltails_data.xml
It shud be HeaderTrailerDetails_data.xml

Thanks alot.

Jul 23 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Koen | last post by:
Hi all, I created a little database to manage my e-books. The program will synchronize a table with the contents of a directory. Works great. Because I keep additional info (like keywords) to...
6
by: Robert Lawson | last post by:
I continue to get the below error message when trying to load a aspx file. Could someone please point me in the right direction for solving this? I'm trying to access an access data base and I'm...
0
by: Rob Dob | last post by:
Hi, I have a VS2003 C# asp.net project that has been converted into a VS2005 project. Everything seemed to work well until I make a modification to anything within the Component Designer...
2
by: Eric Falsken | last post by:
Eric Falsken <eric@db4o.com> wrote on 04 Dec 2005: > craigkenisston@hotmail.com wrote on 19 Nov 2005: > >> I'm working in the migration of an asp.net application in 1.1 to 2.0. >> I'm new to...
1
by: ddelaney | last post by:
I've seen this posted before in many places, but have yet to find a real fix. I have a web application on dev server right now, and randomly, hours or days, it returns the expception posted below. ...
2
by: antonyliu2002 | last post by:
I am testing AJAX. I've downloaded the AJAX Extension and the CTP December package and installed on BOTH my development machine and the production server. Then I created a very very simple web...
2
by: jjlagtap | last post by:
Hey everyone When I try to open a file i get the Exception listed below. The weird thing is it works when I run the web app locally and when i use a remote server and open a file on my computer....
3
by: pratikkagda | last post by:
Hi all, My system contains Framework 3.5 with visual studio 2008 as well as 2005; here I have developed an application with crystal report with framework 2.0. It is working great in my system but...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
11
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.