|
I've just spent an hour wondering what dark force was silently consuming an exception in my application and eventually found out that it was a binding source. Having read the documentation(!) I can see that the BindingSource.DataError event is raised when "a currency-related exception is silently handled" ref[^].
If the unhandled exception had made the application crash and burn in the usual manner then the error would have been very obvious. As it was I only noticed it when a control showing detailed information did not update when I clicked down the rows in a datagridview.
Is it possible to stop the BindingSource silently consuming exceptions or is it prudent to treat a subscription to the DataError event as non-optional?
Alan.
For completeness this is the code where the exception originates.
private void BindingSource_PositionChanged(object sender, EventArgs e) {
BindingSource bs = (BindingSource)sender;
FileRecord frec = bs.Current as FileRecord;
if (frec != null) {
Detail.Text = this.FormatData(frec.File);
} else {
Detail.Clear();
}
}
|
|
|
|
|
Any body have a good link to a coding conventions document? have to present a document of coding conventions for an upcoming project.
have checked out the one here on codeproject but there is alot of negativity towards it
Thanks
Simon
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|
|
|
|
Coding techniques and programming practices standards - here.
|
|
|
|
|
Just wing it.
|
|
|
|
|
I wish that was possible less documentation to give.. As the project team is made up with a .net developer and 2 * MSAccess Developers thought it was best to sing from the same hymn sheet
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|
|
Hi,
I hope this is the right place to ask: I distantly remember coming accross an article here on codeproject.com some time ago where someone described the problem that Visual Studio scrambles the order of resources in RESX files (or something very similar). IIRC, it also provided a tool that would alphabetically sort the resources. However, I can't find that article anymore.
Does someone know the article I'm talking about? Or maybe give me tips how/where to look for it?
Thanks
|
|
|
|
|
|
No, unfortunately this is not what I was looking for. IIRC, the article was neither ASP specific nor was it concerned with (manually) producing code. It was just about how Visual Studio treats the RESX files.
Nonetheless, thanks for your answer.
|
|
|
|
|
|
Thanks, but again that's not what I'm looking for...
|
|
|
|
|
You could try using the article search available on codeproject.
OR you could actually do a search on Google - it is amazing how Google throws up results related to CP first .
|
|
|
|
|
I've already tried that. Otherwise I wouldn't have asked here in the boards.
It's difficult since I don't remember the contents exactly.
|
|
|
|
|
I suspect that this[^] is the article you are thinking of.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Yes, that's it! Thank you very much!
|
|
|
|
|
upgrading source code from .net framework 1.1 (vs2003) to 2.0 (vs2005), i am facing error msg "Class not registered" for Interop.MOZILLACONTROLLib.dll.
please help!
|
|
|
|
|
You should re-install your control library (as you did when you were using the 1.1 framework). Note that you'd better check if there's a new version.
|
|
|
|
|
I think you need to register library Interop.MOZILLACONTROLLib.dll
using regsvr32.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Interop libraries do not need registered, they are .NET assemblies.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
By raw values, I mean the application level values provided by UI controls, such as the Text property on a TextBox. Too often I find myself writing code to check and parse such values before they get used as a business level value, e.g. PaymentTermsNumDays.
I've mitigated a lot of the spade work with rough and ready extension methods like String.ToNullableInt, but we all know that just isn't right. We can't put the whole world on String's shoulders.
Do I look at tasking my UI to provide business values, using a ruleset pushed out from the server app, or open my business objects up a bit to do the required sanitising etc. as they required? Neither of these approaches sits quite right with me; the first seems closer to ideal, but quite a bit of work, while the latter doesn't show much respect to the business objects' single responsibility. The responsibilities of the UI are a closer match.
Between these extremes, I could also just implement another DTO layer, an IoC container with sanitising and parsing services, derive enhanced UI controls, or stick to copy and paste inline drudgery.
|
|
|
|
|
|
|
I have made a window application with MS access database to analysis student performance in his class for each exam that he appeared for.
I have a table named result with following fields:
classname,sectionname,subjectname,exam type ,rollno,studentname and marks.
On one form I have taken crystal reportviewer and 5 comboboxes for selecting class,section, subject, exam(first,second,final or unit tests), and student name.
After selecting these values , click on button to generate graph of his marks for each exam.
I was able to generate graph for one student for any particular class and section.
But the problem is that the graph is not generating for for other exams and other students.
My code is able to give graph for one student and not for other.
Kindly help me in resolving this problem and provide me with some solution.
|
|
|
|
|
Hi
in my .net web application using c# i have used crystal reports in local i can run my project with out any error but when do the same using server its shows some security permisons should be stopped
my error is this....
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
Line 28: da = new SqlDataAdapter("select Receiptno,convert(varchar,date,105) date,AdminNo,Purpose,InsourceAmount,sourcedetail from InsourceAccount1", cn);
Line 29: da.Fill(ds);
Line 30: CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables[0]);
Line 31: CrystalReportViewer1.DataBind();
Line 32: //}
Source File: c:\domains\bpofos.com\wwwroot\ssvs\reports\insourcefinalreport.aspx.cs Line: 30
Stack Trace:
Please give some suggestions to rectify this issue.
parden if any mistakes "sorry i m not good at english" please if u can solve send a mail to my id.
Thanks & Regards
sateesh
msateesh.2006@gmail.com
msateesh143@yahoo.com
|
|
|
|