Home Dashboard Directory Help
Search

Nullable types for typed dataset by Satheesh.Babu


Status: 

Closed
 as External Help for as External


36
0
Sign in
to vote
Type: Suggestion
ID: 284009
Opened: 6/24/2007 1:00:37 AM
Access Restriction: Public
1
Workaround(s)
view

Description

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.
Details
Sign in to post a comment.
Posted by DannyH246 on 8/13/2009 at 7:32 AM
What a surprise!!?? - no update, no word, no fix.

Maybe theyre working on a new db access framework to replace the entity relationship framework. Then that can get binned just like LINQ to SQL.
Posted by Gerry Cox on 4/27/2009 at 1:45 PM
Personally, I find this rediculous. This has been an issue for 6 years and when you finally introduced nullable types into .Net Framework, you didn't think to fix this?
Posted by Daniel Smith on 11/20/2008 at 1:22 PM
"this will be considered as a high priority item for subsequent release"

Excellent - we're all waiting with bated breath for this to be resolved in VS2010 then. It will definitely be worth the 6 year(!!!) wait since the first reports back in 2004.
Posted by JasonBoland on 11/20/2008 at 11:15 AM
Why does this say it's resolved and closed?
Posted by boomhauer on 8/26/2008 at 12:10 AM
is there a followup to this item. i noticed it was set to "closed" but has yet to be resolved, even in the new .net 3.5 sp1 release
Posted by Microsoft on 6/25/2007 at 3:24 PM
Hello,

Thanks for your suggestion on improving nullable type support in Typed Dataset. Unfortunately, we won't be able to address this issue in Visual Studio "Orcas". However, this will be considered as a high priority item for subsequent release.

Thanks!

Young Joo
Program Manager
Visual Basic
Sign in to post a workaround.
Posted by Danila Korablin on 6/29/2010 at 6:54 AM
For example we have DataSet MailRegion and a row RegionID(Int16) with AllowDBNull is set to true.
Then partial property will be something like this:
<pre>
public partial class MailRegionRow
{
    public RegionType? Region
    {
        get
        {
            if(this.IsRegionIDNull())
                return (RegionType?)null;
            else
                return (RegionType)this.RegionID;
        }
        set
        {
            if(value.HasValue)
                this.RegionID = (Int16)value.Value;
            else
                this.SetRegionIDNull();
        }
    }
}
</pre>