views:

63

answers:

1

Hi all,

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 thrown.

Any suggestions would be appreciated.

+2  A: 

Cast the value into a bit before returning it

CAST (value AS bit)
Matti Virkkunen