inc/mdssqliteconnection.h
changeset 43 c5e73110f733
parent 28 c461c7fa72c2
child 63 e538444823de
--- a/inc/mdssqliteconnection.h	Fri Jul 23 10:03:59 2010 +0300
+++ b/inc/mdssqliteconnection.h	Fri Aug 06 09:56:02 2010 +0300
@@ -237,11 +237,15 @@
 
         /**
         * cleanup method (from TBase)
-        * according to status does Commit/Rollback/nothing
+        * according to status does Rollback or nothing if commit was succesfull
         */
         inline void Close()
             {
-            if ( iErrorState != KErrNone )
+            // Internal error state is KErrNone if the transaction could be created successfully,
+            // and the state is resetted if the transaction is committed succesfully. Only if the
+            // transaction is started succesfully but not committed, it needs to be rolled back
+            // to close the ongoing transaction
+            if ( iErrorState == KErrNone )
                 {
                 TRAP( iErrorState, iConnection.TransactionRollbackL() );
                 }
@@ -259,17 +263,6 @@
             }
 
         /**
-        * Rolls back the transaction explicitly
-        * - possibility to receive leave
-        * eliminates actions on destructor.
-        */
-        inline void RollbackL()
-            {
-            iConnection.TransactionRollbackL();
-            Reset();
-            }
-
-        /**
         * Resets the transaction
         * (does not commit or rollback or do anything)
         */