Link to home
Start Free TrialLog in
Avatar of slightlyoff
slightlyoff

asked on

VB.NET System.InvalidOperationException

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!
Avatar of x77
x77
Flag of Spain image

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.
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.
Avatar of Howard Cantrell
need to see some of your code to troubleshoot.
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.
Hi there;

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

Best regards.
ASKER CERTIFIED SOLUTION
Avatar of slightlyoff
slightlyoff

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial