'Close the connection now (rather than whenever __del__ is called).
The connection will be unusable from this point forward;
an Error (or subclass) exception will be raised if any operation is attempted with the connection.
The same applies to all cursor objects trying to use the connection.'

def close(self):

    self.messages = []
    try:
        self._closeAdoConnection()
    except Exception as e:
        self._raiseConnectionError(InternalError, e)
    if (not onIronPython):
        pythoncom.CoUninitialize()
