none
Unable to Use TableAdapters in VS2008 RRS feed

  • Question

  • I am stuck with VS2008 trying to work with multiple TableAdapters in my DataSet in my project. Currently I have 5 table adapters in my project and they all work fine. However, when I go to create a new TableAdapter, I go through the TableAdapter Configuration Wizard to  create the TableAdapter and everything completes normally. I can even query and see the results properly in the wizard.

    The problem is when I go to use the TableAdapter ('DataTable1TableAdapter'), it is not visible in Intellisense, IOW, I can not reference it in my code to use it! If I right click on it and select Preview Code I get the error msg.

        An unexpected error has occurred. Please record the following message when seeking support from Microsoft:

        Source:Microsoft.VSDesigner
        ErrorCode:-1
        Additional Info:

        [note: when I click Help it takes me to a 'Information Not Found' page]

    The table does have a primary key defined - I checked all that.

    Thank you for any ideas/suggestions!!!

    Warren
    VS2008 SP1/.NET 3.5 SP1
    SQL 2008


    warren
    Friday, June 11, 2010 6:50 PM

Answers

  • Hello Warren,

     

    Welcome to ADO.NET DataSet forum!

     

    Could you please perform some further actions to help us narrow down the issue.    

     

    1)      Create a new project and test the TableAdapter to avoid project specific setting issues.

    2)      Open the solution in another machine to avoid some machine setting issues.

    3)      Select some other tables except the problematic table which leads to the issue, which can avoid table structure issue. 

     

    Also, please verify whether the problem only occur when we add TableAdatper manually.   If we select the table when we create the strongly typed DataSet, does the problem still exist?  

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, June 15, 2010 3:15 AM
    Moderator
  • Hello Lingzhi,

    Sorry for my delay. I think I found the solution.

    Simply creating table adapters in a DataSet does somehow not appear instantiate them for use with the project. You can verify this by creating a new project, adding a DataSet, then adding TableAdapters. Now go try to reference the Table Adapter in program - you can't.

    So what I tried was creating a table adapter, then assign it as the binding source of a control. I then unassigned it as the binding source and now can see the table adapter with IntelliSense in the project. Everything is good.

    Thank you for your help!!


    warren
    Wednesday, June 30, 2010 5:00 PM

All replies

  • Hello Warren,

     

    Welcome to ADO.NET DataSet forum!

     

    Could you please perform some further actions to help us narrow down the issue.    

     

    1)      Create a new project and test the TableAdapter to avoid project specific setting issues.

    2)      Open the solution in another machine to avoid some machine setting issues.

    3)      Select some other tables except the problematic table which leads to the issue, which can avoid table structure issue. 

     

    Also, please verify whether the problem only occur when we add TableAdatper manually.   If we select the table when we create the strongly typed DataSet, does the problem still exist?  

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, June 15, 2010 3:15 AM
    Moderator
  • Hi Warren,

     

    I am writing to check the status of the issue on your side.  Would you mind letting me know the result of the suggestions? 

     

    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com

     

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, June 21, 2010 9:10 AM
    Moderator
  • Hello Lingzhi,

    Sorry for my delay. I think I found the solution.

    Simply creating table adapters in a DataSet does somehow not appear instantiate them for use with the project. You can verify this by creating a new project, adding a DataSet, then adding TableAdapters. Now go try to reference the Table Adapter in program - you can't.

    So what I tried was creating a table adapter, then assign it as the binding source of a control. I then unassigned it as the binding source and now can see the table adapter with IntelliSense in the project. Everything is good.

    Thank you for your help!!


    warren
    Wednesday, June 30, 2010 5:00 PM
  •  

    Glad to hear everything is good now.  :-)

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, July 1, 2010 6:51 AM
    Moderator