R
Robert Gaston
I've seen posts on this, but never a confirmation that anyone's suggestions
actually worked...
I have a sql stored proc that returns multiple result sets. I used the VS
dataset designer, and just drug the stored proc onto the designer to build
the strongly typed dataset.
One of the resultsets includes nulls in some columns. When I attempt to
fill this dataset using adapter.fill, I get type casting errors on every one
of these null fields during the fill if the type is a value type ( decimal,
double, float, datetime ).
I have edited the xsd, adding the nillable=true attribute to these columns,
and regenerated the dataset, but this does not fix anything.
I can turn off the constraint checking, and perform the fill, but when I
turn constraint checking back on, I get the same exceptions of course.
It seems to me that when the strongly typed dataset class is generated, the
nillable attribute is ignored, although it does generate the IsMyFieldNull
and SetMyFieldNull methods.
Any thoughts on this would be greatly appreciated!
Robert Gaston
actually worked...
I have a sql stored proc that returns multiple result sets. I used the VS
dataset designer, and just drug the stored proc onto the designer to build
the strongly typed dataset.
One of the resultsets includes nulls in some columns. When I attempt to
fill this dataset using adapter.fill, I get type casting errors on every one
of these null fields during the fill if the type is a value type ( decimal,
double, float, datetime ).
I have edited the xsd, adding the nillable=true attribute to these columns,
and regenerated the dataset, but this does not fix anything.
I can turn off the constraint checking, and perform the fill, but when I
turn constraint checking back on, I get the same exceptions of course.
It seems to me that when the strongly typed dataset class is generated, the
nillable attribute is ignored, although it does generate the IsMyFieldNull
and SetMyFieldNull methods.
Any thoughts on this would be greatly appreciated!
Robert Gaston