hi,
i am getting an exception while populating the data in the datagrid.
am getting the values into datatable and binding it to the datagrid but it is not
displaying the data and giving an exception like
System.ArgumentException: Empty path name is not legal.
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at Common.Logger.Write_line_to_Log(String message, String logFile)
2 12456 Plater 7,872
Recognized Expert Expert
That error message relates to File IO. That doesn't seem like something that would happen from a databind.
Check the line location for the error and post the code associated with it?
TRScheel 638
Recognized Expert Contributor
hi,
i am getting an exception while populating the data in the datagrid.
am getting the values into datatable and binding it to the datagrid but it is not
displaying the data and giving an exception like
System.ArgumentException: Empty path name is not legal.
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at Common.Logger.Write_line_to_Log(String message, String logFile)
I am going out a limb here, but you have a StreamWriter somewhere. On the initialization of that StreamWriter, you passed an empty string as the file location.
Something like: -
string FileLocation;
-
StreamWriter SWriter = new StreamWriter(FileLocation);
-
That will throw just that exception.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Penn Markham |
last post by:
Hello all,
I am writing a script where I need to use the system() function to call
htpasswd. I can do this just fine on the command line...works great
(see attached file, test.php). When my...
|
by: Keith Patrick |
last post by:
Could someone explain to me the relationship between these two classes? I
am ripping my hair out trying to divert an HttpRequest to a new location via
an HttpWebRequest, but I cannot get my...
|
by: Atara |
last post by:
In my apllication I use the following code:
'-- My Code:
Public Shared Function strDate2Date(ByVal strDate As String) As
System.DateTime
Dim isOk As Boolean = False
If (strDate Is Nothing)...
|
by: Chas Stapleton |
last post by:
I have recently uninstalled VB5 and installed vb.net 2002. In working on an
application, I attempted to add a picturebox and add an image... I
immediately received an "empty path name is not...
|
by: Don |
last post by:
I'm having problems working with a streamwriter object. After closing the
streamwriter and setting it to Nothing, I try to delete the file it was
writing to, but I always get the following error...
| |
by: Juhan |
last post by:
Hi!
I have a strange error in a console application that is hosted by IIS 5.0
and invokes a web service hosted on the same machine.
A request form the web comes in and it is dispatched to a...
|
by: Arthur Dent |
last post by:
How do you sort a generic collection derived from
System.Collections.ObjectModel.Collection?
Thanks in advance,
- Arthur Dent
|
by: Lambuz |
last post by:
Hello everyone,
I have an applciation that uses remoting. When the application is run
via a
local copy it works. When it is run via an HTTP address
RemotingConfiguration.Configure fails....
|
by: =?Utf-8?B?QkJN?= |
last post by:
Hi,
I have an app that is crashing due to a System.ArgumentException. At this
point it's just a simple app to test some basic object values. The main app
is a Windows App that looks like...
|
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,...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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,...
|
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: 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...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |