Changes between Version 14 and Version 15 of FDORfc61


Ignore:
Timestamp:
05/29/11 22:24:01 (14 years ago)
Author:
samwang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc61

    v14 v15  
    3838    ///  Create a save point in this transaction.
    3939    ///
    40     /// \param savePointName
    41     /// Save point name.
     40    /// \param suggestName
     41    /// Suggested save point name.
    4242    ///
    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;
    4446
    4547    /// \brief
     
    5355}
    5456}}}
    55 "!AddSavePoint" method is used to add a save point with a specific name which can later be rolled back to without affecting the work done prior to the save point. "Rollback" method rolls back to a named 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.
    5658
    5759The "FdoIConnectionCapabilities" interface also has to be extended to enable query for this capability:
     
    7880FdoPtr<FdoIInsert> insertCommand;
    7981FdoPtr<FdoITransaction> transaction = connection->BeginTransaction();
    80 transaction->AddSavePoint(L"Save_point_1");
     82FdoStringP spName1 = transaction->AddSavePoint(L"Save_point_1");
    8183try{
    8284......
     
    8789{
    8890    e->Release();
    89     transaction->Rollback(L"Save_point_1");
     91    transaction->Rollback(spName1);
    9092}
    91 transaction->AddSavePoint(L"Save_point_2");
     93
     94FdoStringP spName2 = transaction->AddSavePoint(L"Save_point_2");
    9295FdoPtr<FdoIDelete> deleteCommand;
    9396try{
     
    99102{
    100103    e->Release();
    101     transaction->Rollback(L"Save_point_2");
     104    transaction->Rollback(spName2);
    102105}
    103106transaction->Commit();