Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Connection Error Suppression

Status
Not open for further replies.

JR4VB

Technical User
Jan 13, 2003
36
0
0
US
I am using a VB program to read Data off of a com port and then Insert Rows into a SQL database. I need to write a debug/error routine to detect when the database is offline/the computer is restarting etc.....so I can write these records to a file while the database is not accessable. An On error Go To will not trap the initial error popup that includes the following dialog...."[DBNETLIB][ConnectionOpen(Connect()).] SQL Server does not exist or access denied." This happens on the ADO.Refresh event. After I say ok to this popup then my On Error Go To Sub picks up a simular error with a code of -2147467259. Is there a way to suppress this first popup? because while it is displayed processing is stopping in my program. Other wise I lose all of the data being sent to my PC's com port while this error is displayed and say ok so my program can continue.

I'd appreciate any info....Thanks!

JR
 
Not sure but did you try the InfoMessage Event.
 
No I didn't, How do you use that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top