[SOLVED] MySqlException in C# project
Posted by: Raphaël Threis
Date: April 22, 2013 05:39AM

Hello all,

I'm encountering a problem using the version 6.1.6 of the SqlConnector/NET.

When I try to catch an Exception for example when trying to establish the connection with the Database, the "MySqlException" objet I create in the catch condition isn't available.

try
{
    Connection.Open();
    return true;
}
catch (MySqlException ex)
{

The message that I get is that the MySqlException class isn't "derived" from the System.Exception class.
When I take a look in the object browser in VS 2010, I see the class is derived from " System.Data.Common.DbException".

Can someone tell me how to go trough it ? When I try to access the "System.Data..." with my using, nothing is listed.

Any ideas ?

Thanks for all the advises you can provide.

Raph



Edited 1 time(s). Last edit at 04/22/2013 06:34AM by Raphaël Threis.

Options: ReplyQuote


Subject
Written By
Posted
[SOLVED] MySqlException in C# project
April 22, 2013 05:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.