ArcObjects Library Reference (Carto)  

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,
  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

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