ODBCConnection and scheduled agent error - URGENT

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?

Subject: ODBCConnection and scheduled agent error - URGENT

I think I found it.

Set the SilentMode propertie at True (on the ODBCCon object) just before to call the ConnectTo method.

I used it but too late :wink:

It works now

Subject: ODBCConnection and scheduled agent error - URGENT

Hi, I have exactly the same problem?

Did you found a solution ?

KR