This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapServerDataAccess Interface > IMapServerDataAccess.GetDataSource Method (ArcObjects .NET 10.5 SDK) |
Get Data Source
[Visual Basic .NET] Public Function GetDataSource ( _ ByVal MapName As String, _ ByVal LayerID As Integer _ ) As Object
[C#] public object GetDataSource ( string MapName, int LayerID );
[C++]
HRESULT GetDataSource(
BSTR MapName,
long LayerID,
LPUNKNOWN* ppDataSource
);
[C++]
Parameters MapName [in] MapName is a parameter of type BSTR LayerID [in] LayerID is a parameter of type long ppDataSource [out, retval] ppDataSource is a parameter of type LPUNKNOWN
This function allows fine-grained object access to a FeatureLayer, a RasterLayer or a StandaloneTable by returning IFeatureClass, IRaster or ITable respectively. If the layer or standalone table has any joins, the returned object will not contain the joined portion. In addition any field visibility or field alias set to the layer in the source map document will be ignored as it returns the underlying data source.