Public WithEvents cn As SqlConnection
Private Sub cn_InfoMessage( ByVal sender As Object, ByVal e As System.Data.SqlClIEnt.SqlInfoMessageEventArgs)Handles cn.InfoMessage
For Each err As System.Data.SqlClIEnt.SqlError In e.Errors
If err.State = 1 Then
''not an error, an info message
Else
''State <> 1 means it really is an error
End If
Next
End Sub