Dim conn
Sub DBOpen()
Dim db : db=Server
Set conn=Server
On Error Resume Next
conn
If Err
Err
Response
Response
End If
On Error GoTo
End Sub
Call DBOpen()
… …
conn
From:http://tw.wingwit.com/Article/program/net/201311/14050.html