I'm using VB6 against an SQL Server database.
A few of our user mailings use the extended sp:
Can anyone tell me-
what are my options for error trapping on xp_sendmail?
I know if there is an error, it is written to the SQL Server log.
But, I'd like to know if there is a way to trap any errors such as: mail server down, etc.
Right now, on the VB side, I have this generic error routine; but this won't detect any xp_sendmail errors:
If Cn.Errors.Count > 0 Then
For Each objerror In Cn.Errors
Message = Message & objerror.Number & ":" & objerror.Description _
& "(" & objerror.NativeError & ")" & vbCrLf & vbCrLf
MsgBox Message, vbCritical, "Stored Procedure Error"
If Err.Number <> 0 Then
Message = ""
Message = Message & Error & "(" & Err.Number & ")"
MsgBox Message, vbCritical, "VB Error"
Thanks in advance