SqlDataReader GetBoolean from Calculated Resultset Field
I've got a field in my SQL SPROC resultset that is a calculated CASE statement that returns 1 or 0 (ie True/False).
When I try to use the GetBoolean method of the SqlDataReader class and exception gets th开发者_开发百科rown.
Any suggestions would be appreciated.
Cast the value into a bit
before returning it
CAST (value AS bit)
精彩评论