AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual INT32 MgFeatureService::ExecuteSqlNonQuery ( MgResourceIdentifier resource,
CREFSTRING  sqlNonSelectStatement 
) [pure virtual]

Executes SQL statements NOT including SELECT statements.

Remarks:
The XML returned by MgFeatureService::GetCapabilities says whether a provider supports SQL commands. See Provider Capabilities .
.NET Syntax
virtual int ExecuteSqlNonQuery(MgResourceIdentifier resource, string sqlNonSelectStatement);
Java Syntax
virtual int ExecuteSqlNonQuery(MgResourceIdentifier resource, String sqlNonSelectStatement);
PHP Syntax
virtual int ExecuteSqlNonQuery(MgResourceIdentifier resource, string sqlNonSelectStatement);

Parameters:
resource (MgResourceIdentifier) A resource identifier for a feature source.
sqlNonSelectStatement (String/string) The SQL statement that is NOT a SELECT statement.
Returns:
Returns a positive integer value indicating how many instances (rows) have been affected.
Example (PHP)
 $sql = "update featclass set abyte = 37 where featid = 0";
 $numRows = $featureService->ExecuteSqlNonQuery($activeFeatSrcResId, $sql);

Exceptions:
MgFeatureServiceException 
MgInvalidArgumentException 
MgInvalidOperationException 
MgFdoException