Seeking advice on VB6->ADO->SQL Stored Procedure Error Handling 
Author Message
 Seeking advice on VB6->ADO->SQL Stored Procedure Error Handling

I'm working on a project that uses the following communication flow:

Asp on IIS->VB 6 ActiveX Dll components using ADO->SQL 6.5 Database stored
procedures.  I'm using many com dlls in order to comply with MS 3 tier
programming approach.

I'm trying to figure out the best way to handle errors in this project.
Currently I have error handlers in all of the public dll methods which
simply use the error object to raise the error back to the caller, which is
the asp page.

Is there a standard way of handling errors for this type of communication
flow?  I have read that some people always use one OUTPUT parameter in every
stored procedure and use it to return error numbers.

Thanks in advance.

Rob



Sat, 23 Jun 2001 03:00:00 GMT  
 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

...


Sun, 24 Jun 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Seeking advice on VB6->ADO->SQL Stored Procedure Error Handling

2. VB6->SQL 7 Stored Procedure with Parameters

3. N-tier ADO->OBDC->Visual FoxPro Database advice

4. <<<<<<<<ComboBox>>>>>>>>>>>>

5. using The Shell Command >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

6. >>>>>>While Not rst.EOF

7. VB.Net => Ado.Net = Stored Procedure

8. HELP ==>Oracle Stored Procedure using ADO(VB)

9. HELP ==>Oracle Stored Procedure(PACKAGE) using ADO(VB)

10. PSUDOCODE HELP >>>>>>>>>>>

11. VB5<->RDO2<->ODBC<->ORACLE Procedure Problem

12. VB6 ADO->ODBC->.MDBs ??s

 

 
Powered by phpBB® Forum Software