有人可以建议 - 我们希望将详细的错误消息记录到文本文件或 sql 服务器中,以了解我们创建的 .net 库中发生的任何错误。
Try
'Here we are using the sql command object to fetch the required data
Catch ex As Exception
'Here we want to capture detailed error information in a text file or
'sql server
Finally
If Not _SQLCommand Is Nothing Then
_SQLCommand.Dispose()
End If
If Not _Conn Is Nothing Then
_EConn.Close()
End If
End Try