Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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]
Remarks

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.