Changes between Version 18 and Version 19 of MapGuideRfc78
- Timestamp:
- 07/13/09 17:19:28 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc78
v18 v19 97 97 /// 98 98 virtual MgTransaction* BeginTransaction(MgResourceIdentifier* resource) = 0; 99 100 virtual MgSqlDataReader* ExecuteSqlQuery(MgResourceIdentifier* resource, 101 CREFSTRING sqlStatemen 102 MgTransaction* transaction) = 0; 103 104 virtual INT32 ExecuteSqlNonQuery( MgResourceIdentifier* resource, 105 CREFSTRING sqlNonSelectStatement, 106 MgTransaction* transaction) = 0; 99 107 }; 100 108 }}} … … 103 111 {{{ 104 112 MgTransaction 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. 113 AcMapFeatureService::ExecuteSql(resourceId, sql statement1, tran); 114 AcMapFeatureService::ExecuteSql(resourceId, sql statement2, tran); 108 115 tran->Commit() // or tran->Rollback(); 109 116 }}} … … 121 128 This 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. 122 129 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.130 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. 124 131 125 132 == Test Plan ==