none
Creating DataSet in VS2010 WPF Application RRS feed

  • Question

  • When attempting to Preview Data of a table dragged into the DataSet Designer the following error appears:

    Could not get type information for [ProjectName.DataSetFolder.DataSet]

    Can anyone help with information on this issue?

    Wednesday, November 9, 2011 6:40 PM

Answers

  • James...

    Thanks for repsonding so quickly. I'm not as adept at creating DataSets via code as much as I would like to be right now. However, the problem seems to have corrected itself. My dev machine rebooted on me in the middle of my trying to diagnose this issue. It apparently had some Windows 7 SP1 updates to install. After my computer rebooted and after several "failed" attempts of trying other alternative ways to create the DataSet I was trying implement I returned back to the method described in the aforementioned post. Low and behold I didn't get the error anymore.

    Software development is a strange thing indeed

    Marlon

    • Marked as answer by Marlon B Wednesday, November 9, 2011 10:17 PM
    Wednesday, November 9, 2011 10:17 PM

All replies

  • When attempting to Preview Data of a table dragged into the DataSet Designer the following error appears:

    Could not get type information for [ProjectName.DataSetFolder.DataSet]

    Can anyone help with information on this issue?


    Wish I had a direct answer.  What I can say is that the best help I have ever recieved on this topic/issue is simply to not use any drag-drop wizardry to build a DataAccessLayer for any real production environment.   I feel like I lose too much control over any DAL component if I am not the one actually writting the code -- if there ever is an error, I will know where and why it occured far faster.


    James Crandall ~ http://javitechnologies.com Spatial Database Solutions
    Wednesday, November 9, 2011 8:39 PM
  • James...

    Thanks for repsonding so quickly. I'm not as adept at creating DataSets via code as much as I would like to be right now. However, the problem seems to have corrected itself. My dev machine rebooted on me in the middle of my trying to diagnose this issue. It apparently had some Windows 7 SP1 updates to install. After my computer rebooted and after several "failed" attempts of trying other alternative ways to create the DataSet I was trying implement I returned back to the method described in the aforementioned post. Low and behold I didn't get the error anymore.

    Software development is a strange thing indeed

    Marlon

    • Marked as answer by Marlon B Wednesday, November 9, 2011 10:17 PM
    Wednesday, November 9, 2011 10:17 PM
  • Well, glad to hear it fixed itself.

    I'd encourage you to take this experience and evaluate whether or not it is prudent to develop your own DAL's.  It's a big task to jump into something like that, and in general these forums are for seeking/getting answers to immediate problems, so I wish I had a more direct answer to your issue.

    Just relating my own experience since jumping into the .NET environment --- I am coming from the ArcGIS world, but have found tons of value integrating more traditional .NET application arcitecture into my client's GIS infratstructure.  This is why I am here and spend lots of time in MSDN forums rather than GIS-specific forums.  Personally, I feel it was worth the effort to implement layers of seperation into my software architecture, as well as de-coupling any Strongly Typed Datasets from the Datasources that I had been generating them from.

    Again, this is off track from your OP but I think worth the effort to look into.  Have a read thru some of this material and consider making an attempt to implement some of the principles --- it's been very beneficial for me for sure!

    Good luck!

    http://msdn.microsoft.com/en-us/library/bb384398(zh-cn,VS.90).aspx

    http://geek-goddess-bonnie.blogspot.com/2009/09/dataaccess-part-i.html


    James Crandall ~ http://javitechnologies.com Spatial Database Solutions
    Thursday, November 10, 2011 1:49 AM
  • Hi Marlon,

    I'm glad to hear that your issue has been solved. If you have any problem, please feel free to post in the forum.

    Have a nice day.


    Allen Li [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.

    Thursday, November 10, 2011 6:30 AM
    Moderator
  • Well... it's interesting that you should mention using a Data Access Layer because in fact, the senior developer who has designed the bulk of the application that I'm working on has implemented that very thing.

    My dilema is that I've never created reports using this approach and I'm finding it to be a bit of a challenge because I'm not sure where to start on how to retreive the data necessary for the reports I'm trying to create. Once I can get that thought process solved I can move ahead on my tasks but right now I'm very stuck.

    Any help on how to implement what you're suggesting would be greatly appreciated.

    Marlon

    Thursday, November 10, 2011 2:59 PM
  • Hi Marlon,

    I agree totally with what James says and have been a strong proponent of that methodology for many, many years! I have written a few blog posts that you may be interested in:

    First, the topic of TableAdapters and why I don't like them:
    http://geek-goddess-bonnie.blogspot.com/2009/09/tableadapters-are-c-r-a-p.html ... remove the '-' in the word 'c-r-a-p' ... it get's censored here if I spell it out.

    Here's an excerpt from that blog post:

    One of the problems that I see with the TableAdapter is the inflexibility. The generated class tightly-couples the DataSet to the database, and I don't believe that DataSets should be used that way. I use DataSets simply as a data transport mechanism. My DataSets know nothing about where their data comes from, nor should they.

    OK, technically speaking, the DataSet class doesn't know about where its data comes from, just because I'm using a TableAdapter. But the fact the TableAdapter gets generated inside the DataSet.designer.cs means that the DataSet DLL is no longer database agnostic, and that's a very bad thing for correct client-server / SOA architecture. There is no more separation of layers when done this way. The DataAccess classes should be a totally separate layer with their own DLLs, just as the DataSets should live in their own DLLs.

    That post also contains a link to another of my blog posts (http://geek-goddess-bonnie.blogspot.com/2010/04/create-xsd.html) about how to go about creating an .xsd and generating the Typed DataSet without all the TableAdapter junk getting put into it.

    Now, granted, if you don't use TableAdapters, there are extra things you need to take care of in a DataAccess class (as I mention in my 3-part series) for using the DataAdapter instead, but you are in better control and don't run into the problems that are inherent with TableAdapters.

    http://geek-goddess-bonnie.blogspot.com/2009/09/dataaccess-part-i.html
    http://geek-goddess-bonnie.blogspot.com/2009/10/dataaccess-part-ii.html
    http://geek-goddess-bonnie.blogspot.com/2009/10/dataaccess-part-iii.html

    Just my 2 cents ....


    ~~Bonnie Berent [C# MVP]

    geek-goddess-bonnie.blogspot.com
    Saturday, November 12, 2011 5:38 PM