Export (0) Print
Expand All

InvalidDataSourceReference Class

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

Object
  ReportService2005.DataSourceDefinitionOrReference
    ReportService2005.InvalidDataSourceReference

Namespace:  ReportService2005
Assembly:  ReportService2005 (in ReportService2005.dll)

type InvalidDataSourceReference =  
    class 
        inherit DataSourceDefinitionOrReference 
    end

The InvalidDataSourceReference type exposes the following members.

  NameDescription
Public methodInvalidDataSourceReferenceInitializes a new instance of the InvalidDataSourceReference class.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

An InvalidDataSourceReference object is used with the Item property as output by GetItemDataSources 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 Item property of the DataSource class, 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...
    }
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft