Archive of ‘Sql’ category

SqlException class does’nt have public constructor

I am currently preparing ado.net 3.5 course so I try to throw SqlException in one of my examples and realize that SqlException class is sealed and has no public constructor. I have found solution on Rido blog http://blogs.msdn.com/rido how to create SqlException using reflection.         public static SqlException CreateSqlException(string errorMessage, int errorNumber)         […]