InvalidDataSourceReference Class
Collapse the table of content
Expand the table of content

InvalidDataSourceReference Class

SQL Server 2000

Represents a state in which a data source reference is no longer valid.

Public Class InvalidDataSourceReference
   Inherits [Namespace].DataSourceDefinitionOrReference
   Member of [Namespace]

public class InvalidDataSourceReference : [Namespace].DataSourceDefinitionOrReference
   Member of [Namespace]

An InvalidDataSourceReference object is used with the DataSource.Item property as output by the ReportingService.GetReportDataSources method.

In most cases, an InvalidDataSourceReference object is returned when a shared data source has been deleted.

To evaluate whether a data source reference is valid, use the is keyword in C# (TypeOf/Is in Visual Basic) to determine the type of object returned by the DataSource.Item property, as shown in the following C# code:

DataSource[] dataSource;
dataSource = service.GetReportDataSources( "/MyReport" );

foreach ( DataSource ds in dataSource )
    if ( ds.Item is InvalidDataSourceReference )
        // Code to handle a corrupt or missing data source reference goes here...
See Also

Reporting Services Web Service Library

© 2016 Microsoft