MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
virtual MgPropertyCollection* MgFeatureService::UpdateFeatures ( MgResourceIdentifier resource,
MgFeatureCommandCollection commands,
MgTransaction transaction 
) [pure virtual]

Executes the MgDeleteFeatures, MgInsertFeatures, MgUpdateFeatures, MgLockFeatures or MgUnlockFeatures commands contained in the given MgFeatureCommandCollection object within the given transaction.

Remarks:
The XML returned by MgFeatureService::GetCapabilities says whether a provider supports SQL commands. See Provider Capabilities . This API has to be used along with new APIs of MgFeatureService::BeginTransaction. If passing NULL for transaction, it will work the same as MgFeatureService::UpdateFeatures(resource, commands, false).
.NET Syntax
virtual MgPropertyCollection UpdateFeatures(MgResourceIdentifier resource, MgFeatureCommandCollection commands, MgTransaction transaction);
Java Syntax
virtual MgPropertyCollection UpdateFeatures(MgResourceIdentifier resource, MgFeatureCommandCollection commands, MgTransaction transaction);
PHP Syntax
virtual MgPropertyCollection UpdateFeatures(MgResourceIdentifier resource, MgFeatureCommandCollection commands, MgTransaction transaction);
Parameters:
resource(MgResourceIdentifier) A resource identifier for the feature source.
commands(MgFeatureCommandCollection) A collection of feature commands to be executed.
transaction(MgTransaction) The MgTransaction instance on which the commands will be executed.
Returns:
Returns an MgPropertyCollection object. Each property in the collection corresponds to a command in the MgFeatureCommandCollection argument. The property name is the index of the command in the feature command collection.
Remarks:
If transaction is NULL, this method will not throw any exceptions on command execution failure. In such cases, you need to inspect the returned collection for any instances of MgStringProperty Such instances will contain the exception message for the corresponding command that was executed
Exceptions:
MgFeatureServiceException
MgInvalidArgumentException
MgInvalidOperationException
MgFdoException
Since:
2.2