Strongly-typed datasets and queries without matching select clauses

I learned an annoying lesson about these late last week.  I’d created the dataset by dragging and dropping the necessary tables from SQL Server in Visual Studio 2005.  Then I added a query to one of the tables that didn’t include every one of its columns.  Unfortunately, a number of the columns my query didn’t return didn’t allow nulls.  I ended up modifying my query to include those columns, even though I don’t use them.  I didn’t try removing the columns from the dataset, but that probably would have worked too.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.