VBA Command don't recognize Error Trapping
- From: "David Rodríguez" <d_rincon@xxxxxxxxxxx>
- Date: Fri, 12 Jan 2007 09:57:27 +0100
Hi all.
I'm developing a VBA vs. SQL Server 2000 application , and I have a problem
with some Stored Procedures.
All SPs have their own Error Trapping, so if there's an error during the
execution, we have a VB validation reading Output parameters in order to
caught backend errors and proceed in consecuence.
My problem is that some procedures, fails in the .execute statement (VB
code) and execution goes directly to VB Error Trapping code, (instead
continue the flow, to the standard Back End error trapping we have
implemented, as the rest of procedures).
There is an example to make process more understandable:
Private Sub ..... ( )
On error goto error...
Declare and initialize variables
Open command
Edit command
.execute (HERE, SP FAILS)
Custom Error Trapping code (Most of SPs executes this code when they
fails)
Read Output Parameters
If @@ERROR <> 0
Perform needed actions
Close and deallocate command
Exit:
End
Error: (THE WRONG SPs COMES DIRECTLY HERE)
action1
action 2
goto exit
I'm looking for difference between procedures which are correctly trapped
and don't, but I found nothing weird.
Any idea?
Thanks in advance.
.
- Follow-Ups:
- Re: VBA Command don't recognize Error Trapping
- From: Douglas J. Steele
- Re: VBA Command don't recognize Error Trapping
- Prev by Date: How can I modify a report in Crystal Report 7
- Next by Date: Re: Determine length of a string?
- Previous by thread: How can I modify a report in Crystal Report 7
- Next by thread: Re: VBA Command don't recognize Error Trapping
- Index(es):