[code]
Const dsn = "{your connection string or DSN name here}" On Error Resume Next Set conn = CreateObject("ADODB.Connection") conn.ConnectionTimeOut = 10 ' 10 second wait limit conn.Open dsn If err.Number = 0 Then wscript.echo "CONNECTION: SUCCESS" Else wscript.echo "CONNECTION: FAILED" End If conn.Close Set conn = Nothing [/code]
No comments:
Post a Comment