Changes between Version 18 and Version 19 of MapGuideRfc78


Ignore:
Timestamp:
Jul 13, 2009, 5:19:28 PM (15 years ago)
Author:
klain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc78

    v18 v19  
    9797    ///
    9898virtual MgTransaction* BeginTransaction(MgResourceIdentifier* resource) = 0;
     99
     100virtual MgSqlDataReader* ExecuteSqlQuery(MgResourceIdentifier* resource,
     101                                         CREFSTRING sqlStatemen
     102                                         MgTransaction* transaction) = 0;
     103
     104virtual INT32 ExecuteSqlNonQuery( MgResourceIdentifier* resource,
     105                                  CREFSTRING sqlNonSelectStatement,
     106                                  MgTransaction* transaction) = 0;
    99107};
    100108}}}
     
    103111{{{
    104112MgTransaction tran = AcMapFeatureService::StartTransaction(resourceId);
    105 AcMapFeatureService::ExecuteSql(resourceId, sql statement1);
    106 AcMapFeatureService::ExecuteSql(resourceId, sql statement2);
    107 AcMapFeatureService::UpdateFeatures(resourceId, standard commands, false);  // NOTE: you have to pass in false for useTransaction here.
     113AcMapFeatureService::ExecuteSql(resourceId, sql statement1, tran);
     114AcMapFeatureService::ExecuteSql(resourceId, sql statement2, tran);
    108115tran->Commit() // or tran->Rollback();
    109116}}}
     
    121128This is a new API, so API documentation need to be updated. However, it will not affect the existing application if you don't use it at all.
    122129
    123 As noted in the above example, if you use it along with UpdateFeatures(), additional attention should be paid not to pass in true for useTransaction. Otherwise, it will incur a nested transaction which is currently not supported by FDO.
     130If you use it along with UpdateFeatures(), additional attention should be paid not to pass in true for useTransaction. Otherwise, it will incur a nested transaction which is currently not supported by FDO.
    124131
    125132== Test Plan ==