?
Solved

VB.NET System.InvalidOperationException

Posted on 2009-12-23
6
Medium Priority
?
1,620 Views
Last Modified: 2012-05-08
When I start my program, I get errors in the Immediate Window.  The program runs fine, but I would like to figure out what's going on.

This is what shows up:
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll

The interesting thing, is that I don't do any database calls or connections until after a button is pressed...  and these errors pop up when the form loads.

Any ideas on things i should look for?  I know this may be vague, i'm just getting started with the troubleshooting.

Thanks!
0
Comment
Question by:slightlyoff
6 Comments
 
LVL 15

Expert Comment

by:x77
ID: 26114382
Try stop on each exception to verify.
Debug - > Exceptionns  -> check all checkBox.

Some times also, when you change debug options, debug Window can Show exceptions from Il compiler for recursive calls, Class A, contains member of Class B and B contains members of class A.
Verify your changed options on Tools->Options->Debug.
0
 
LVL 15

Expert Comment

by:x77
ID: 26114553
On a DataForm if you stablish the connection on Form Load, note that connection declared at component level can have an invalid ConnectionString then it fails on New method.
0
 
LVL 27

Expert Comment

by:planocz
ID: 26114566
need to see some of your code to troubleshoot.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 26120391
These messages are popped up when exceptions are handled by user code. Some exceptions might be thrown in your code. Some might be thrown in the class libraries and handled. So even though you are not using db at the load, the DLL may still be throwing and handling exceptions. Nothing to worry about though.
0
 
LVL 12

Expert Comment

by:jazzIIIlove
ID: 26147602
Hi there;

Could you post your code so we can check for the exception?

Best regards.
0
 
LVL 1

Accepted Solution

by:
slightlyoff earned 0 total points
ID: 26303939
Sorry for the long delay, I had to work around it, and now, the errors do not show up.  I'm not sure what i changed - but as i mentioned before, the program had run fine dispite the exceptions.

Anyways, thanks to everyone for their help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month16 days, 11 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question