Changes between Version 14 and Version 15 of FDORfc61
- Timestamp:
- 05/29/11 22:24:01 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FDORfc61
v14 v15 38 38 /// Create a save point in this transaction. 39 39 /// 40 /// \param s avePointName41 /// S ave point name.40 /// \param suggestName 41 /// Suggested save point name. 42 42 /// 43 FDO_API virtual void AddSavePoint(FdoString* savePointName) = 0; 43 /// \returns 44 /// The actual name used by the provider 45 FDO_API virtual FdoString* AddSavePoint(FdoString* suggestName) = 0; 44 46 45 47 /// \brief … … 53 55 } 54 56 }}} 55 "!AddSavePoint" method is used to add a save point with a s pecific name which can later be rolled back to without affecting the work done prior to the save point. "Rollback" method rolls back to anamed save point.57 "!AddSavePoint" method is used to add a save point with a suggest name which can later be rolled back to without affecting the work done prior to the save point. The suggested name is not necessarily the provider will use beacuse the provider would make sure that the name used to mark the save point is unique. "Rollback" method rolls back to a specific named save point. 56 58 57 59 The "FdoIConnectionCapabilities" interface also has to be extended to enable query for this capability: … … 78 80 FdoPtr<FdoIInsert> insertCommand; 79 81 FdoPtr<FdoITransaction> transaction = connection->BeginTransaction(); 80 transaction->AddSavePoint(L"Save_point_1");82 FdoStringP spName1 = transaction->AddSavePoint(L"Save_point_1"); 81 83 try{ 82 84 ...... … … 87 89 { 88 90 e->Release(); 89 transaction->Rollback( L"Save_point_1");91 transaction->Rollback(spName1); 90 92 } 91 transaction->AddSavePoint(L"Save_point_2"); 93 94 FdoStringP spName2 = transaction->AddSavePoint(L"Save_point_2"); 92 95 FdoPtr<FdoIDelete> deleteCommand; 93 96 try{ … … 99 102 { 100 103 e->Release(); 101 transaction->Rollback( L"Save_point_2");104 transaction->Rollback(spName2); 102 105 } 103 106 transaction->Commit();