boricua1213
asked on
Strongly typed dataset Null Values Causes Exception
I got a table that has columns that are int type that allow for nulls. I used VS2005 dataset designer to create strongly typed dataset. When I retrieve rows that have null values in those columns an exception is thrown.
Has anybody got a workaround to this. I was thinking of changing type to string since in VS that is the only type I can set it not to throw exception then in my BLL convert it to nullable(of Integer).
Any ideas would certainly help.
Thank you
Rick
Has anybody got a workaround to this. I was thinking of changing type to string since in VS that is the only type I can set it not to throw exception then in my BLL convert it to nullable(of Integer).
Any ideas would certainly help.
Thank you
Rick
Have you tried typing the columns as Nullables?
ASKER
Well,
in the properties of the column in the dataset AllowDBNull is set to True.
And in SQL the column is nullable.
What exactly do u mean by "typing the columns as Nullables"?
Rick
in the properties of the column in the dataset AllowDBNull is set to True.
And in SQL the column is nullable.
What exactly do u mean by "typing the columns as Nullables"?
Rick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
With 2005, you just have to keep using IsNull before referencing the column.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.