Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

CreateFeatureSource
DescribeSchema
DescribeSchema
DescribeSchemaAsXml
DescribeSchemaAsXml
DescribeWfsFeatureType
EnumerateDataStores
ExecuteSqlNonQuery
ExecuteSqlQuery
GetCapabilities
GetClassDefinition
GetClasses
GetConnectionPropertyValues
GetFeatureProviders
GetLockedFeatures
GetLongTransactions
GetSchemaMapping
GetSchemas
GetSpatialContexts
GetWfsFeature
SchemaToXml
SelectAggregate
SelectFeatures
SelectFeatures
SetLongTransaction
TestConnection
TestConnection
UpdateFeatures
XmlToSchema
virtual MgSqlDataReader* MgFeatureService::ExecuteSqlQuery | ( | MgResourceIdentifier * | resource,
|  | CREFSTRING | sqlStatement |
| ) |  |  | `[pure virtual]`
Executes the SQL SELECT statement on the specified feature source. Remarks: The XML returned by MgFeatureService::GetCapabilities says whether a provider supports SQL commands. See Provider Capabilities . .NET Syntax
`virtual MgSqlDataReader ExecuteSqlQuery(MgResourceIdentifier resource, string sqlStatement);`
Java Syntax
`virtual MgSqlDataReader ExecuteSqlQuery(MgResourceIdentifier resource, String sqlStatement);`
PHP Syntax
`virtual MgSqlDataReader ExecuteSqlQuery(MgResourceIdentifier resource, string sqlStatement);`
  Parameters:
  | resource | (MgResourceIdentifier) A resource identifier referring to a feature source.
  | sqlStatement | (String/string) The SQL SELECT statement.
Returns: Returns an MgSqlDataReader instance (or NULL). Note: If any statement other than SELECT is passed to this method, it will throw an MgFdoException. Example (PHP)
     $sql = "select featid,abyte from featclass where featid = 0";
     $sqlDataReader = $featureService->ExecuteSqlQuery($activeFeatSrcResId, $sql);
  Exceptions:
  | MgFeatureServiceException |
  | MgInvalidArgumentException |
  | MgInvalidOperationException |
  | MgFdoException |

Comments or suggestions? Send us feedback.