• See if this helps:

    If cmdObj.State = 1 Then

    With cmdObj

    .blah ...

    End With

    Else

    'the connection is not open, try opening a new connection

    'also fire off your error logging routine here noting the lost connection

    End If