Hi everyone,
I'm trying to trap errors in VB6 (SQL2000 errors) and I've checked the ADO
errors collection. I get back native errors, so I plug these into my select
case statements. However, there's a little more to it than I thought.
Here's my statement:
ErrorHandler:
Select Case Err.Number
Case 18456
MsgBox "Invalid Login. Please try again.", vbOKOnly +
vbExclamation, "Error"
Case 17142
MsgBox "No new logins are being accepted. Please try again later.",
vbOKOnly + vbExclamation, "Error"
Case 17
MsgBox "Unable to connect to system. Please try again later.",
vbOKOnly + vbCritical, "Error"
End Select
Anyone see anything wrong? The error I'm receiving is: Object variable or
With block variable not set.
Any help would be great. Thanks.
Brad