none
How to Delete Data Source from VB.Net Project

    Question

  • Hello,

     

    How do I delete a data source from a vb.net project.  There is no delete/remove in the data sources window and if I delete the corresponding xsd file I end up with errors in the designer file.  I'm having to do this because when I change a data table I unable to get the change reflected in the data source by using refresh.

     

    Thanks,

     

    Vic

     


    Visual Basic; Access; PHP; SQL Server; MySQL Developer
    Thursday, July 14, 2011 4:39 PM

Answers

  • You can commit changes from the dataset back to the datasource by either of the two methods:

    myDataSet.AcceptChanges()

    MyTableAdapter.Update()

    To answer your question on Refresh...it's for data only...NOT schema.

    Entity Framework was designed to compensate for the changes you're looking for.

    Adam


    Ctrl+Z
    • Proposed as answer by Mike FengModerator Tuesday, July 19, 2011 8:01 AM
    • Marked as answer by VicSpain Tuesday, July 19, 2011 1:44 PM
    Thursday, July 14, 2011 6:44 PM

All replies

  • You have to delete the dataset and adapter as well.

    Adam


    Ctrl+Z
    Thursday, July 14, 2011 4:44 PM
  • Adam,

     

    Thank you, that was it and I need to do that before deleting the XSD and then it works.  

     

    Can you tell me why changes to the table structure are not reflected in the data set when I do a refresh??

     

    Thanks,

     

    Vic

     


    Visual Basic; Access; PHP; SQL Server; MySQL Developer
    Thursday, July 14, 2011 5:33 PM
  • You can commit changes from the dataset back to the datasource by either of the two methods:

    myDataSet.AcceptChanges()

    MyTableAdapter.Update()

    To answer your question on Refresh...it's for data only...NOT schema.

    Entity Framework was designed to compensate for the changes you're looking for.

    Adam


    Ctrl+Z
    • Proposed as answer by Mike FengModerator Tuesday, July 19, 2011 8:01 AM
    • Marked as answer by VicSpain Tuesday, July 19, 2011 1:44 PM
    Thursday, July 14, 2011 6:44 PM