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

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

Remarks:
The XML returned by MgFeatureService::GetCapabilities says whether a provider supports SQL commands. See Provider Capabilities .
.NET Syntax
virtual MgPropertyCollection UpdateFeatures(MgResourceIdentifier resource, MgFeatureCommandCollection commands, bool useTransaction);
Java Syntax
virtual MgPropertyCollection UpdateFeatures(MgResourceIdentifier resource, MgFeatureCommandCollection commands, boolean useTransaction);
PHP Syntax
virtual MgPropertyCollection UpdateFeatures(MgResourceIdentifier resource, MgFeatureCommandCollection commands, bool useTransaction);
Parameters:
resource(MgResourceIdentifier) A resource identifier for the feature source.
commands(MgFeatureCommandCollection) A collection of feature commands to be executed.
useTransaction(boolean/bool) If true and transactions are supported by the Fdo provider, execute all commands inside a transaction. If false, do not use a transaction.
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 useTransaction is false, 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