def is_connection_valid(self):
    try:
        pyodbc.connect(self._connection_string)
        return True
    except (pyodbc.DatabaseError, pyodbc.InterfaceError):
        return False
def is_connection_valid(self):
    try:
        pyodbc.connect(self._connection_string)
        return True
    except (pyodbc.DatabaseError, pyodbc.InterfaceError):
        return False