How to add a bool value to a datarow?

Oct 22 2005 12:04 AM
Hi all,

I wonder how to add a bool value (true/false) to a datarow, I tried the following two ways, both don't work:
1.
bool selected = false;
DataRow dr = ds.Tables[0].NewRow();
dr[0] = selected;
ds.Tables[0].Rows.Add(dr);
2.
item = false;
ds.Tables[0].Rows.Add(Item);

What's the problem?

Thanks.

Answers (1)