Visual Studio and .NET Framework Home
Would like to be able to use nullable types with Typed Dataset
Chris Robinson- MSFT
as Won't Fix
11/20/2008 11:14:01 AM
User(s) can reproduce this bug
I am using typed dataset in my current project.I came to know that currently there is no support for nullable types in typed dataset and visual studio code generator also does not generate nullable types for columns.I would prefer if a primitive datatype like int that allow nulls in database level can be specified as nullable types in typed dataset.
I am reopening a previously closed issue.
.NET Framework 3.5 SP1
Operating System Language
Steps to Reproduce
Would like to be able to use a nullable type in the generated code when I set nullable datacolumn in the dataset to be true
Only creates a non nullable type
Creates a nullable type instead
TAP Code (if applicable)
You can indicate your satisfaction with how Microsoft handled this issue by completing this quick
3 question survey
to post a comment.
Please enter a comment.
Robert Heinig II
on 10/24/2011 at 12:33 AM
Let me tell you how this looks to someone who hasn't tried wizard-generated code in Visual Studio since the good old VS6 days: Simply ridiculous. I can only assume that the marketing department actively prevents the dev team from trying to establish some unsability baselines...
on 10/30/2010 at 12:22 AM
I 've got VS2010 hoping that this problem is resolved,but it is still resist,this is really an awful bug,
don't know how to fix it
on 10/30/2009 at 12:02 PM
We've got a bunch of applications built around DataSets. There's just no way that we have the resources to rewrite these using e.g. the Entity Framework. It's likely that these apps will be using DataSets for many years to come (some of them will likely never be rewritten).
I'd love to see nullable types supported directly - it would make my life so much easier.
on 12/1/2008 at 2:01 PM
Thanks for contacting us regarding nullable types in Typed Dataset. This is a known limitation of the Typed Dataset. Unfortunately, we will not be able to fix this in the next release of Visual Studio.
Please let us know if you have more feedback on Typed Dataset or any other Visual Studio features.
David A Nelson
on 11/21/2008 at 1:08 PM
The reason that nothing is happening on this issue is that, for better or worse, typed datasets are essentially a deprecated technology (I personally think better, but I understand that people who already have significant investments in them see it differently). Microsoft has already stated that the recommended data access technology for the foreseeable future will be the Entity Framework (essentially deprecating LINQ to SQL). The ADO.NET team is hesitant to go back and put and invest any significant effort in a technology that in their minds has already been replaced.
on 11/20/2008 at 2:36 PM
This is obviously the number one request for typed datasets and it's been bugged countless times on Connect, going as far back as 2004.
We really need to push this hard and get things moving. We've done all the right things - posted and voted on bugs on Connect, we've chased this up over the years in the MSDN forums, and we've had PMs do follow up blog posts on the issue promising changes, but we don't seem to get any closer to actually actioning some sort of resolution. What more can we do?
on 11/20/2008 at 1:22 PM
But how can it be resolved if we are having to do it again?
Chris Robinson- MSFT
on 11/20/2008 at 11:42 AM
The connect bug you talked about is a closed issue and it was directed at orcas. We need something to track this request for .net 4.0
on 11/20/2008 at 11:29 AM
You should import all the validations from https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=284009 since it's not resolved...
to post a workaround.
Please enter a workaround.
on 2/17/2010 at 7:25 AM
here's a workaround from http://forums.asp.net/t/1227689.aspx (bottom of the page):
This is a limitation of typed datasets. The dataset generator will never generate nullable properties. So from your example, the "ApprovingUser" property will always be of type int, even if you've specifically specified that the column is nullable by setting the AllowDBNull property in the designer.
The only way to set such properties to null is to use the helper methods that the dataset generator also creates. The methods are named after your column name, so in your case, you should have methods on the data row object called IsApprovingUserNull() and SetApprovingUserNull().
Obviously, it's a pain in the ass to have to use these methods, and it confuses a lot of people. It would be much better if they simply generated nullable properties. People have been pleading for support for this until they're blue in the face, yet MSFT don't seem to be listening. See the latter part of the following thread for details:
If you're interested in getting this resolved, please also vote for the suggestions on Connect:
© 2014 Microsoft