Here is the problem:
I use Adodc control in vb6.0 to access sql server,everything works fine until when the network failed.
the code simply like this:
<pre>
On Error ErrHandle

Adodc1.ConnectionString = "Provider=SQLOLEDB.1;user id=sa;password=123456;initial catalog=test;data source=192.168.1.23\SQLEXPRESS;Connect Timeout=30"
Adodc1.Recordset.Properties("prompt") = adPromptNever

Adodc1.RecordSource = "select *from admin"
Adodc1.Refresh
'other code

ErrHandle:
'do nothing
</pre>
when the code run to Adodc1.Refresh,it pop up an error dialog with message "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server Not Exist or Access Denied"
It's normal that you can't access data base when the network is not working,but since my program is runing at the server host I don't want it to click the dialog all the time when it can't connect to sql server.

So is there some way that can avoid the error dialog? and let it goto ErrHandle Section

I have being run into this problem for several months, any advice would help.

thank you.