Share via


CommonServiceSoap.GetDataSourceInfo Method

CommonServiceSoap.GetDataSourceInfo Method

Returns one or more data sources in an array of DataSource objects.


Public Function GetDataSourceInfo (
 dataSourceNames As System.String() )
 As DataSource()


[C#]

public DataSource[]
 GetDataSourceInfo (System.String[]
 dataSourceNames);

Parameters

  • dataSourceNames
    Optional. An array of strings representing the DataSource.Name property of the data sources for which information is returned. The array can contain up to 500 items.

Remarks

  • The strings passed in the dataSourceNames parameter must match the DataSource.Name property exactly.

  • If the dataSourceNames parameter is null, the GetDataSourceInfo method returns a DataSource object for each DataSource object accessible by the caller.

  • The items in the DataSource array are returned in the same order as the items in the array passed in the dataSourceNames parameter.

Example

[Visual Basic]

'Get information about all available data sources
Dim commonService As New CommonServiceSoap()
Dim myDataSources() As DataSource
myDataSources = commonService.GetDataSourceInfo(Nothing)
Dim ds As DataSource
For Each ds In myDataSources
 Console.WriteLine(ds.Name)
Next



[C#]

//This example assumes that the MapPoint Web Service namespace
//has been imported

//Get information about all available data sources
CommonServiceSoap commonService = new CommonServiceSoap();
DataSource[] myDataSources;
myDataSources = commonService.GetDataSourceInfo(null);
foreach (DataSource ds in myDataSources)
{
 Console.WriteLine(ds.Name);
}


See Also

  CommonServiceSoap Class   |   DataSource.Name Property