MapGuide API Reference
|
virtual MgSqlDataReader* MgFeatureService::ExecuteSqlQuery | ( | MgResourceIdentifier * | resource, |
CREFSTRING | sqlStatement, | ||
MgParameterCollection * | parameters, | ||
MgTransaction * | transaction | ||
) | [pure virtual] |
Executes the SQL SELECT statement on the specified feature source within the given transaction.
virtual MgSqlDataReader ExecuteSqlQuery(MgResourceIdentifier resource, string sqlStatement, MgParameterCollection parameters, MgTransaction transaction); |
virtual MgSqlDataReader ExecuteSqlQuery(MgResourceIdentifier resource, String sqlStatement, MgParameterCollection parameters, MgTransaction transaction); |
virtual MgSqlDataReader ExecuteSqlQuery(MgResourceIdentifier resource, string sqlStatement, MgParameterCollection parameters, MgTransaction transaction); |
resource | (MgResourceIdentifier) A resource identifier referring to a feature source. |
sqlStatement | (String/string) The SQL SELECT statement. |
parameters | (MgParameterCollection) Parameters binded to the SQL statement. |
transaction | (MgTransaction) The MgTransaction instance on which the sql statement will be executed. |
$sql = "select featid,abyte from featclass where featid = :id"; $prop = new MgInt32Property("id", 150); $param = new MgParameter($prop); $params = new MgParameterCollection(); $params->Add($param); $transaction = $featureService->BeginTransaction($activeFeatSrcResId); $sqlDataReader = $featureService->ExecuteSqlQuery($activeFeatSrcResId, $sql, $params, $transaction); $transaction->Commit();
MgFeatureServiceException | |
MgInvalidArgumentException | |
MgInvalidOperationException | |
MgFdoException |