-
Sep 20th, 2006, 09:10 AM
#1
Thread Starter
Member
Exceptions
I am writing an application for pocket pc using vb.net and at what to me seems like random point in the code (I'm sure it not random) exceptions are generated and logged in the 'immediate window' at the bottom of the screen without a message halting my application.
Instead all that happens is my application just stops running without any information as to why except the folloiwng messages
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
I have tried to debug this and find out why the messages are appearing but seem to be hitting a dead end
If anyone can come up with the answer before I stumble accross if I would be greatful
-
Sep 20th, 2006, 09:33 AM
#2
-
Sep 21st, 2006, 06:31 AM
#3
Thread Starter
Member
Re: Exceptions
Thanks for the link, I found some similar as well
The problem I have is that I get the following list of exceptions when I try and open a connection to the sql mobile database on the pocket pc.
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.SqlServerCe.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.SqlServerCe.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.VisualBasic.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
I never used to get this error. I have since changed version of the sql components on the device from sql server ce to sql mobile 2005. It is not that I get this problem and it is causing me to have problems running my app in any way shape or form
How could this be caused/fixed now that I am running the latest version of sql mobile?
-
Sep 21st, 2006, 08:36 AM
#4
Thread Starter
Member
Re: Exceptions
I think the root of the problem is when I try and execute the following line of code
VB Code:
reader = command.ExecuteReader(CommandBehavior.CloseConnection)
It is at this point in the code when I get the following exception
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
I thought this might be something to do with the sqlserverce dll's so I re-installed sql mobile and I cannot register the System.Data.SqlServerCe.dll file
I get the message saying the the file was loaded by it counldn't find the register server entry point
Please help :-(
-
Oct 2nd, 2006, 07:23 AM
#5
New Member
Re: Exceptions
Hello !
I have exactly the same problem. And the line where the problem appears is the same kind :
rsParametresPDA = CmdSQLPDA.ExecuteReader()
Strange behaviour...
Do you have any information ?
Thank you !!
-
Oct 2nd, 2006, 08:22 AM
#6
Re: Exceptions
Read the blog that Kleinma linked to ... and don't panic
-
Oct 3rd, 2006, 02:14 AM
#7
New Member
Re: Exceptions
Originally Posted by Merrion
Read the blog that Kleinma linked to ... and don't panic
I do agree, but when I read this :
Does a first chance exception mean there is a problem in my code?
First chance exception messages most often do not mean there is a problem in the code. For applications / components which handle exceptions gracefully, first chance exception messages let the developer know that an exceptional situation was encountered and was handled.
For code without exception handling, the debugger will receive a second chance exception notification and will stop with a unhandled exception.
Take care!
I wonder : I do not have exeption handling for this code, and no second chance exception appears...
And the "exceptional" situation always appears... not very exceptional...
The error is :
Une exception de première chance de type 'System.IO.FileNotFoundException' s'est produite dans mscorlib.dll
If this is not a problem, I abandon my search... !
Thanx ;-)
-
Oct 3rd, 2006, 08:14 AM
#8
Re: Exceptions
you are saying you are getting a first chance exception of that?
If so, like stated above, don't worry about it. It simply lets YOU the developer know that in some framework method you called (something that is outside the bounds of your actual code) an exception occured, but it was handled with error handling and all is well.
-
Oct 3rd, 2006, 08:36 AM
#9
New Member
Re: Exceptions
Originally Posted by kleinma
you are saying you are getting a first chance exception of that?
If so, like stated above, don't worry about it. It simply lets YOU the developer know that in some framework method you called (something that is outside the bounds of your actual code) an exception occured, but it was handled with error handling and all is well.
There's an error and all is well...
Same as BSOD : oh my god, an error... Dont panic, your server is out of service, but the error has been catched by Windows...
OK, thank you for your help, I will never panic anymore !!
Last edited by gabor; Oct 3rd, 2006 at 08:40 AM.
Fabrice, Toulouse, FRANCE
Using VB.NET 2005/.NET 2.0
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|