Results 1 to 4 of 4

Thread: How best to update table definition in ADO.NET DataSet Designer

  1. #1

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    How best to update table definition in ADO.NET DataSet Designer

    Using database first I created a table. I drag and drop it from the Server Explorer onto the designer and it defines my table. Now I decide to add or change a column. As it is now, the only way I can think to do it is to delete the table, save and drag-n-drop it again. I was hoping I could right click someplace and find a command "Update table definition". Is there an elegant way to update the table definition in the designer?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: How best to update table definition in ADO.NET DataSet Designer

    I haven't really used typed DataSets for a while but, when I did, I used the Data Sources window to generate a Data Source and that would create DataTables and table adapters for each selected table. I'm not sure whether dragging from the Server Explorer generates a Data Source or not. Check the Data Sources window and see whether it has. If it has, there's a button on the toolbar at the top of the Data Sources window that will refresh the Data Source from the database. That should enable you to add missing tables and columns. Just note that it will not remove tables or columns that are not in the database any more. Deletes must be done manually, because it doesn't want to delete anything by mistake that you may have added manually.

  3. #3

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    Re: How best to update table definition in ADO.NET DataSet Designer

    Thnks

  4. #4

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    Re: How best to update table definition in ADO.NET DataSet Designer

    I finally had time to try this and it worked. If I change the name of a column, I need to delete it in the designer and add it back by running the wizard. Thanks.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width