D
David N.
Hi All,
I have the following Net.VBScript:
Set oConnection = CreateObject("adodb.connection")
Set oRecord = CreateObject("adodb.RecordSet")
Set oError = CreateObject("adodb.Error")
oConnection.Open
On Error Resume Next
Set oRecord = oConnection.Execute("TestProcedure")
DisplayErrorInfo()
....
.....
.....
Sub DisplayErrorInfo
MsgBox "Before Loop"
For Each oError in oRecord.ActiveConnection.Errors
MsgBox "Description: " & oError.Description
Next
MsgBox "After Loop"
End
The stored procedure TestProcedure always raises an error at the end (for
testing purpose). I can see that the error is caught by the above VB
script, and the messages "Before Loop" and "After Loop" are displayed.
However, the execution never goes into the for/next loop.
How do I get the error message that is raised by the stored procedure?
Thanks
I have the following Net.VBScript:
Set oConnection = CreateObject("adodb.connection")
Set oRecord = CreateObject("adodb.RecordSet")
Set oError = CreateObject("adodb.Error")
oConnection.Open
On Error Resume Next
Set oRecord = oConnection.Execute("TestProcedure")
DisplayErrorInfo()
....
.....
.....
Sub DisplayErrorInfo
MsgBox "Before Loop"
For Each oError in oRecord.ActiveConnection.Errors
MsgBox "Description: " & oError.Description
Next
MsgBox "After Loop"
End
The stored procedure TestProcedure always raises an error at the end (for
testing purpose). I can see that the error is caught by the above VB
script, and the messages "Before Loop" and "After Loop" are displayed.
However, the execution never goes into the for/next loop.
How do I get the error message that is raised by the stored procedure?
Thanks