'In case a database does provide transactions this method causes the the database to roll back to
the start of any pending transaction. Closing a connection without committing the changes first will
cause an implicit rollback to be performed.
If the database does not support the functionality required by the method, the interface should
throw an exception in case the method is used.
The preferred approach is to not implement the method and thus have Python generate
an AttributeError in case the method is requested. This allows the programmer to check for database
capabilities using the standard hasattr() function.
For some dynamically configured interfaces it may not be appropriate to require dynamically making
the method available. These interfaces should then raise a NotSupportedError to indicate the
non-ability to perform the roll back when the method is invoked.'

def rollback(self):

    self.messages = []
    if self.supportsTransactions:
        self.adoConn.RollbackTrans()
        if (not (self.adoConn.Attributes & adXactAbortRetaining)):
            self.adoConn.BeginTrans()
    else:
        self._raiseConnectionError(NotSupportedError, None)
