This document is archived and information here might be outdated.  Recommended version.


IMapServerDataAccess.GetDataSource Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapServerDataAccess Interface > IMapServerDataAccess.GetDataSource Method
ArcGIS Developer Help

IMapServerDataAccess.GetDataSource Method

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
);
[C++]
Parameters
MapName [in]

MapName is a parameter of type BSTR LayerID [in]
LayerID is a parameter of type long

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

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.

See Also

IMapServerDataAccess Interface