473,563 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception of type System.Exceptio n was thrown.

I am using asp.net c#...I am adding a field to cystal report but I get error
Exception of
type System.Exceptio n was thrown. How can I solve this error...When I insert
a field from another table I dont get error...

Thanks...
Nov 16 '05 #1
6 17948
Selen <sk*****@yahoo. com> wrote:
I am using asp.net c#...I am adding a field to cystal report but I get error
Exception of
type System.Exceptio n was thrown. How can I solve this error...When I insert
a field from another table I dont get error...


Whenever you get an exception, you should look at the message inside it
- it will almost always tell you what went wrong.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
How can I look inside it...I am using try catch like that: but I didnt catch
anything...

try

{

ParameterFields paramFields=new ParameterFields ();

ParameterField paramField=new ParameterField ();

ParameterDiscre teValue discreteVal=new ParameterDiscre teValue ();
paramField.Para meterFieldName= "Tip";

discreteVal.Val ue =Session["Tip"].ToString ();

paramField.Curr entValues.Add (discreteVal);

paramFields.Add (paramField);

this.CrystalRep ortViewer2 .ParameterField Info =paramFields;


CrystalDecision s.Shared.TableL ogOnInfo myLogin=new TableLogOnInfo ();
report.Load (Server.MapPath ("Status.rpt")) ;

foreach(Crystal Decisions.Cryst alReports.Engin e.Table mytable in
report.Database .Tables )

{

myLogin=mytable .LogOnInfo ;

myLogin.Connect ionInfo .Password ="abc";

myLogin.Connect ionInfo .UserID ="sa";

mytable.ApplyLo gOnInfo (myLogin);

}

this.CrystalRep ortViewer2 .ReportSource =report;

}

catch(Exception ex)

{
}

"Jon Skeet [C# MVP]" <sk***@pobox.co m>, iletide sunu yazdi
news:MP******** *************** *@msnews.micros oft.com...
Selen <sk*****@yahoo. com> wrote:
I am using asp.net c#...I am adding a field to cystal report but I get error Exception of
type System.Exceptio n was thrown. How can I solve this error...When I insert a field from another table I dont get error...


Whenever you get an exception, you should look at the message inside it
- it will almost always tell you what went wrong.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #3
Selen <sk*****@yahoo. com> wrote:
How can I look inside it...I am using try catch like that: but I didnt catch
anything...


Ah... if you're unable to catch the exception, that certainly makes
things harder.

You could try using the AppDomain.Unhan dledException to see whether you
can see the exception that way...

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4
I dont know using it...
How can I use it??

Thanks...
"Jon Skeet [C# MVP]" <sk***@pobox.co m>, iletide sunu yazdi
news:MP******** *************** *@msnews.micros oft.com...
Selen <sk*****@yahoo. com> wrote:
How can I look inside it...I am using try catch like that: but I didnt catch anything...


Ah... if you're unable to catch the exception, that certainly makes
things harder.

You could try using the AppDomain.Unhan dledException to see whether you
can see the exception that way...

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #5
Selen <sk*****@yahoo. com> wrote:
I dont know using it...
How can I use it??


The same way you use any event - you subscribe to it, providing a
delegate which will be called when the event fires (in other words,
when an exception is thrown).

You probably then want to log the details of the exception.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6
Given that your catch handler is catching all managed exceptions
(System.Excepti on), then either you did catch it but didn't do anything with
it, or the exception is thrown from some other part of your code.

Try adding a trace statement inside the catch block and see what it prints
out.

"Selen" <sk*****@yahoo. com> wrote in message
news:Or******** *****@TK2MSFTNG P10.phx.gbl...
How can I look inside it...I am using try catch like that: but I didnt catch anything...

try

{

ParameterFields paramFields=new ParameterFields ();

ParameterField paramField=new ParameterField ();

ParameterDiscre teValue discreteVal=new ParameterDiscre teValue ();
paramField.Para meterFieldName= "Tip";

discreteVal.Val ue =Session["Tip"].ToString ();

paramField.Curr entValues.Add (discreteVal);

paramFields.Add (paramField);

this.CrystalRep ortViewer2 .ParameterField Info =paramFields;


CrystalDecision s.Shared.TableL ogOnInfo myLogin=new TableLogOnInfo ();
report.Load (Server.MapPath ("Status.rpt")) ;

foreach(Crystal Decisions.Cryst alReports.Engin e.Table mytable in
report.Database .Tables )

{

myLogin=mytable .LogOnInfo ;

myLogin.Connect ionInfo .Password ="abc";

myLogin.Connect ionInfo .UserID ="sa";

mytable.ApplyLo gOnInfo (myLogin);

}

this.CrystalRep ortViewer2 .ReportSource =report;

}

catch(Exception ex)

{
}

"Jon Skeet [C# MVP]" <sk***@pobox.co m>, iletide sunu yazdi
news:MP******** *************** *@msnews.micros oft.com...
Selen <sk*****@yahoo. com> wrote:
I am using asp.net c#...I am adding a field to cystal report but I get error Exception of
type System.Exceptio n was thrown. How can I solve this error...When I insert a field from another table I dont get error...


Whenever you get an exception, you should look at the message inside it
- it will almost always tell you what went wrong.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Nov 16 '05 #7

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

Similar topics

42
2350
by: cody | last post by:
public DateTime Value { get { try { return new DateTime(int.Parse(tbYear.Text), int.Parse(tbMonth.Text), int.Parse(tbDay.Text)); } catch (FormatException)
44
4178
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level user tasks should always be included in a try/catch block that actually handles any exceptions that occur (log the exception, display a message box,...
4
7534
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP SP2, and IIS's SMTP and WWW servers are installed. Here is the error trace: System.Web.HttpException: Could not access 'CDO.Message' object. --->...
1
4966
by: SMG - Idealake | last post by:
Hi all, I am getting following error on my error, what could be the reason? Exception of type System.OutOfMemoryException was thrown. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ...
19
3196
by: Diego F. | last post by:
I think I'll never come across that error. It happens when running code from a DLL that tries to write to disk. I added permissions in the project folder, the wwwroot and in IIS to NETWORK_SERVICE and Everyone, with Full Control to see if it's a permissions problem. The project is hosted in a Windows 2003 Server and developed from PCs in a...
2
3861
by: Seth | last post by:
Ok, here is my setup. I have a fully functioning HTTP Handler implemented. The handler is supposed to handle every single request that comes in to a particular virtual directory. Thus, in IIS, I have a mapping of .* to the aspnet_isapi.dll. And my web.config has an entry thusly: <add verb="*" path="*" type="HandlerClass,...
2
45449
by: Eugene | last post by:
Hi, I have a problem when loading one of my dll. I have a main class that would load a winform in another dll using reflection. When I load it using Assembly.CreateInstance(DLLName.DLLFormName), an exception is thrown with the message: "Exception has been thrown by the target of an invocation." ?ex.Source "mscorlib" ...
6
1889
by: semedao | last post by:
Hi All, I had working code that made custom serialization on objects that inherit from queue in the inherited queue I create my own GetObjectData: public void GetObjectData(SerializationInfo info, StreamingContext ctxt) { lock (this.SyncRoot) {
132
5506
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid hard-to-find bugs. http://distributed-software.blogspot.com/2007/01/c-exception-handling-is-defective.html Regards, zorabi@ZHMicro.com...
2
1141
by: plily | last post by:
Hi, i have created a simple web user control and when i try to run it i get the following error,pls. help: Exception of type System.StackOverflowException was thrown. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it...
0
7658
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8101
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...
1
7631
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7943
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...
0
6238
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5204
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...
1
2077
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
912
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...

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.