473,722 Members | 2,295 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 17966
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
2383
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
4216
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, etc.). 2. Low-level operations that are used to carry out the high level tasks
4
7548
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. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an...
1
4982
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. Exception Details: System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.
19
3218
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 domain, developing with Visual Studio 2005 Beta 1. -- Regards,
2
3875
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, HandlerAssembly" /> And this is working just fine thus far. The handler gets all the requests and works like a...
2
45456
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" ?ex.GetType.AssemblyQualifiedName "System.Reflection.TargetInvocationException, mscorlib, Version=1.0.5000.0,
6
1898
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
5564
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 http://www.zhmicro.com http://distributed-software.blogspot.com
2
1145
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 originated in the code. Exception Details: System.StackOverflowException: Exception of type...
0
8863
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
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
8052
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6681
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5995
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
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
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
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
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.