MapGuide API Reference
|
virtual INT32 MgFeatureService::ExecuteSqlNonQuery | ( | MgResourceIdentifier * | resource, |
CREFSTRING | sqlNonSelectStatement, | ||
MgParameterCollection * | parameters, | ||
MgTransaction * | transaction | ||
) | [pure virtual] |
Executes SQL statements NOT including SELECT statements within the given transaction.
virtual int ExecuteSqlNonQuery(MgResourceIdentifier resource, string sqlNonSelectStatement); |
virtual int ExecuteSqlNonQuery(MgResourceIdentifier resource, String sqlNonSelectStatement); |
virtual int ExecuteSqlNonQuery(MgResourceIdentifier resource, string sqlNonSelectStatement); |
resource | (MgResourceIdentifier) A resource identifier for a feature source. |
sqlNonSelectStatement | (String/string) The SQL statement that is NOT a SELECT statement. |
parameters | (MgParameterCollection) Parameters binded to the SQL statement. |
transaction | (MgTransaction) The MgTransaction instance on which the sql statement will be executed. |
$sql = "update featclass set abyte = 37 where featid = :id"; $prop = new MgInt32Property("id", 150); $param = new MgParameter($prop); $params = new MgParameterCollection(); $params->Add($param); $transaction = $featureService->BeginTransaction($activeFeatSrcResId); $numRows = $featureService->ExecuteSqlNonQuery($activeFeatSrcResId, $sql, $params, $transaction); $transaction->Commit();
MgFeatureServiceException | |
MgInvalidArgumentException | |
MgInvalidOperationException | |
MgFdoException |