Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

[SOLVED] MySqlException in C# project (2 replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 1451

Trending Articles