Public Event DatabaseError(ByVal msg As String) .... Try objConn = New SqlConnection(ConnectionString) objConn.Open Catch ex As Exception RaiseEvent DatabaseError(ex.Message) End Try
try { SqlConnection objconn = new SqlConnection(ConnectionString); objconn.Open; } catch (Exception ex) { throw ex; }
Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied. Source Error: Line 27: catch (SqlException ex) Line 28: { Line 29: throw ex; Line 30: } Line 31: }