I'm converting the Data Access Code in one of my Asp.Net projects To MSSQL from MySQL. I'm taking this opportunity to attempt to remove any dependencies on provider specific classes or namespaces.
So instead of working directly with MySqlCommand or SqlCommand classes, I'm using DbProviderFactories.GetFactory() methods to return DbCommand objects.
The one issue I'm having is I had code that trapped MySqlExpection exceptions. I'd like a provider agnostic way of trapping Sql exceptions. Is this possible?