ON ERROR GOTO does not fire using ADO connection object 
Author Message
 ON ERROR GOTO does not fire using ADO connection object

I use an ADO connection object, connecting to a Sybase SQL server, and
I execute some SQL statements. All is ok, when there is NO error. When
an error appears, my ON ERROR command gets triggered, and control is
passed to my error handler routine.

This happens ONLY ONCE!!!

If I close the connection object and re-open to clear things up, and
try executing another SQL statement and an error occurs, the visual
basic Run-Time error gets fired, and NOT my error handler, which halts
the application.

If I use debug, the statement that is causing the problem, is
the .execute method of the ADO connection object.

Any help would be HUGELY appreciated, this thing is puzzling me for
days now.

Thank you and best regards,

Christos

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Mon, 18 Feb 2002 03:00:00 GMT  
 ON ERROR GOTO does not fire using ADO connection object

Quote:
>I use an ADO connection object, connecting to a Sybase SQL server, and
>I execute some SQL statements. All is ok, when there is NO error. When
>an error appears, my ON ERROR command gets triggered, and control is
>passed to my error handler routine.

>This happens ONLY ONCE!!!

>If I close the connection object and re-open to clear things up, and
>try executing another SQL statement and an error occurs, the visual
>basic Run-Time error gets fired, and NOT my error handler, which halts
>the application.

What does your error handling routine look like? Are you trapping for ADO
errors or other errors.

Try to clear the ado error collection after you have handled the ado errors
the first time.

Niels

--
**********************************
Universal Dataaccess Ltd.
http://www.universaldataaccess.com
**********************************



Mon, 18 Feb 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. -2147467259 Unspecified error using ADO 2.5 connection object

2. Connection Errors via ADO Connection Object

3. ADO Command Object using Multiple Connection Objects

4. On error goto not being called when getting an error

5. ado errors not trapped by vb error object???

6. Error when using on error goto

7. Trouble with ADO Connection.Open() Error 3625 Item not found in collection

8. problems using OpenSchema method of an ADO connection object

9. Error in ADO Connection Object

10. Data bound controls using Adodc and ADO connection object

11. ADO uses login ID of windows not the one in the connection string

12. ADO: Connection Error: Not enough storage to complete

 

 
Powered by phpBB® Forum Software