
Seeking advice on VB6->ADO->SQL Stored Procedure Error Handling
Dan, if I understand it right you are saying that it's bug that when you do
a Err.Raise, the current Err.Description and Err.Source are cleared?
In my opinion this isn't a bug, but by design, also it isn't because of ADO.
When you raise an error it means that you want to provide error-info to the
calling code. If you don't provide a source and/or a description they get
cleared out. The way I use to make sure the original source and description
'bubble up' is below.
tmpDescription = Err.Description
tmpSource = Err.Source
Err.Raise 635, tmpSource, tmpDescription
Edward Smit
...
Quote:
>want to draw your attention to a bug in ADO that will mess you up. This
bug
>will crop up in your ActiveX DLLs if you use Err.Raise to send the errors
up
>to the calling code. If you use Err.Raise in a procedure that used any ADO
>object, then there's a strong likelihood that Err.Description and
Err.Source
>are going to get cleared out when you call Err.Raise, which results in a
>worthless error message at the presentation layer. I recommend logging
...