Hi,
i think you do not need to write a type cast for your case. if you use a
value of type boolean in your code and your db field is a bit the cast will
be done automaticly. BUT if your db field is set to nullable you have to
check DBNull first when you read the value. Or you declare your type on code
side as nullable (for example: "private boolean? myValue").
HTH
--
André Achtermeier :: Senior Consultant
www.prodot.de
"GotDotNet?" <cs*********@optonline.netwrote in message
news:uA**************@TK2MSFTNGP02.phx.gbl...
>I have a bit field in my dataset that reads true or false, but i need to
save it to the db bit column as 0 or 1, how can i convert the true or false
to 0 or 1 so it saves into the table?