Re: ADO error trapping not working
- From: "Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Apr 2006 11:53:49 -0500
"Franck" <the_darkblast@xxxxxxxxxxx> wrote in message
news:1145976990.793089.293430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Actually his code doesnt work for me either but first of all
case -5000 mean : (Variable Case) minus 5000
i just change to this and it actually work for me
case clng("-214746259")
and even
case "-214746259"
the second one work if you havent use the explicit option :P
Enclosing the number in quotes makes it a string. It will not match with
Err.Number, unless you convert the number to a string. I originally tested
with the following VBScript snippet:
On Error Resume Next
Err.Raise -214746259
Select Case Err.Number
Case -214746259
Wscript.Echo "Match"
Case Else
Wscript.Echo "Else"
End Select
On Error GoTo 0
This convinced me the syntax is correct, as I got the message "Match". The
code should work as long as the error has not been cleared, there is an On
Error statement, and everything is in one method/sub/program. We don't see
in the code fragment originally posted how the error is raised or how we get
to the Case statement.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
.
- References:
- ADO error trapping not working
- From: James Houston
- Re: ADO error trapping not working
- From: Richard Mueller
- Re: ADO error trapping not working
- From: argusy
- Re: ADO error trapping not working
- From: argusy
- Re: ADO error trapping not working
- From: Franck
- ADO error trapping not working
- Prev by Date: Re: ADO270.CHM help file
- Next by Date: passing AND in ado.execute to Oracle
- Previous by thread: Re: ADO error trapping not working
- Next by thread: Re: ADO error trapping not working
- Index(es):
Relevant Pages
|