none
WPF Forms - Creating a Typed Dataset VS2010 - Confused! RRS feed

  • Question

  • I have done quite a bit of reading and am totally confused about working with my sql server 2008 database using a typed dataset.

    I have about 100 tables and created the connection to the database and a dataset containing the whole database schema (Seems odd as I would have thought I would create individual datasets for the area of the application being used, ) Anyway this has given me everything I need to start dragging controls onto the design area, also alot of predefined table adapters.

    I have now had to add a few columns to existing tables here and there and cannot see them in the dataset, what is happening?

    Very Confused.

     

    Thursday, December 9, 2010 2:29 AM

Answers

  • Jim,

    Have you tried to regenerate/rebuild the Dataset?  I wish I had a step-by-step for you to do, but I don't so I hope that someone will chime in.  You also might want to take this over to the VB General forum as there is a bit more activity there and lots of others that have probably been in your situation.

    I am probably not going to be the best resource on this because I am not much into the Dataset designer thing, and tend to either write my own Data Classes/Entities or generate my own StronglyTyped Datasets outside of the drag-and-drop designers and wizards.  I think the main reason why I have done this is because of what you are experiencing now --- what seems like a lack of control over what it is I am building. 

    Also a bit off topic... 100 tables in a single DataSet?  I am not going to say good or bad on that as each implementation has it's own specific requirements.  But have you considered a solid approach to representing your data entities that are associated with the datasource?  I always seem to go back to this article to refresh and keep me on track with architecture things:

    http://msdn.microsoft.com/en-us/library/ee817644.aspx

    And a more comprehensive series:

    http://msdn.microsoft.com/en-us/library/dd673617.aspx


    James Crandall ~ http://javitechnologies.com Spatial Database Solutions
    • Marked as answer by liurong luo Thursday, December 16, 2010 1:54 AM
    Thursday, December 9, 2010 4:31 AM
  • Like James, I too prefer to generate my own StronglyTyped Datasets outside of the drag-and-drop designers and wizards. Personally, I totally disagree with the whole TableAdapter thing (preferring DataAdapters). If you'd like a quick idea on a fairly easy way to do create your DataSets without all that wizard stuff, take a look at my blog entry:

    http://geek-goddess-bonnie.blogspot.com/2010/04/create-xsd.html


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    • Marked as answer by liurong luo Thursday, December 16, 2010 1:54 AM
    Sunday, December 12, 2010 1:41 AM

All replies

  • Jim,

    Have you tried to regenerate/rebuild the Dataset?  I wish I had a step-by-step for you to do, but I don't so I hope that someone will chime in.  You also might want to take this over to the VB General forum as there is a bit more activity there and lots of others that have probably been in your situation.

    I am probably not going to be the best resource on this because I am not much into the Dataset designer thing, and tend to either write my own Data Classes/Entities or generate my own StronglyTyped Datasets outside of the drag-and-drop designers and wizards.  I think the main reason why I have done this is because of what you are experiencing now --- what seems like a lack of control over what it is I am building. 

    Also a bit off topic... 100 tables in a single DataSet?  I am not going to say good or bad on that as each implementation has it's own specific requirements.  But have you considered a solid approach to representing your data entities that are associated with the datasource?  I always seem to go back to this article to refresh and keep me on track with architecture things:

    http://msdn.microsoft.com/en-us/library/ee817644.aspx

    And a more comprehensive series:

    http://msdn.microsoft.com/en-us/library/dd673617.aspx


    James Crandall ~ http://javitechnologies.com Spatial Database Solutions
    • Marked as answer by liurong luo Thursday, December 16, 2010 1:54 AM
    Thursday, December 9, 2010 4:31 AM
  • Like James, I too prefer to generate my own StronglyTyped Datasets outside of the drag-and-drop designers and wizards. Personally, I totally disagree with the whole TableAdapter thing (preferring DataAdapters). If you'd like a quick idea on a fairly easy way to do create your DataSets without all that wizard stuff, take a look at my blog entry:

    http://geek-goddess-bonnie.blogspot.com/2010/04/create-xsd.html


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    • Marked as answer by liurong luo Thursday, December 16, 2010 1:54 AM
    Sunday, December 12, 2010 1:41 AM
  • Hi James,

     

    Wonderful job!!! 

     

     

    Best Regards,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 15, 2010 8:57 AM
    Moderator
  • Am checking out your suggestions and looking through the articles:

    'But have you considered a solid approach to representing your data entities that are associated with the datasource?'

    ADO.net

    ORM

    Everytime I read through the new technologies like ORM there are so many developers for and against saying it's slow etc.

    off topic

    I am considering using ADO.net for this business application conversion from access. However after spending the last 2 months researching what UI development kit to choose it seems like access is far easier to knock up UI than say WPF or Silverlight.  Access will make a box for you at a click of a button but these new tools will give you the tree and you have to make the box from it!


    John F Lundy
    Thursday, December 16, 2010 1:32 PM