locked
Failed to get the data source because of the following error: Cannot access a disposed object RRS feed

  • Question

  • I am using the Dataset designer and designed 2 data sets, using the same connection string. when I am trying to open the 1 dataset in the designer i encounter the error Failed to get the data source because of the following error: Cannot access a disposed object. Object name: 'Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService'. while other dataset I can open. Nothing was changed since last work.

         Note: I can still compile and run application successfully. The error is just when I open the data set in Designer.


    Anyone with solution ?
              

    Wednesday, June 20, 2007 7:59 AM

Answers

  • Hi,

      The error occurs when an accessing an object that implements IDisposable where the Dispose method has been called already.  Implementing this by default doesn't enable this, but rather, it is something that the implementer has to implement.

       It is possible that this is happening in the framework, but more likely because you are calling Dispose on something (or doing something which results in Dispose being called) and then trying to access the object that you disposed of.
    And this question has been reported before:

    http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=4b5a65bf-e0b0-46ee-a3dc-1e5d87a86f1e 

       Hope this helps.

    Tuesday, June 26, 2007 2:34 AM