I have a simple piece of code running in a scheduled agent
Dim conn as new ODBCConnection
conn.ConnectTo (DSB, UNAME,PWD)
It runs fine until network problem occurs or SQL server goes down.
When ODBC driver is unable to establish connection it returns an error to Windows as a standard WIndows dialogbox but not to the agent.
The agent remains hanging until somebody opens srever console and presses OK button in driver failure dialogbox.
This prevents other agents from running in the same db.
Is there a way to suppress Windows error message and pass connection error to the agent or at least to allow the agent to go ahead without manual intervention in Windows server?