C# and/or SQL gurus needed ! sql bit field & c#

  • Thread starter Thread starter VegaGucci
  • Start date Start date
V

VegaGucci

Hi there,

I am trying to get the value of an SQL bit field, to link it to an groupbox
with 2 radiobuttons.

but for some reason..the value of the bit field is NEVER 1/true

code:

if sqlfield=true
radioYES.checked=true
else
radioNO.checked=true



I've tried this if (data.tabel[0]["FIELD"].ToString() == "-1")
and this if (data.tabel[0]["FIELD == true)
and this if (data.tabel[0]["FIELD"].ToString() == "1")
radioButton_nameYES.Checked=true;
else
radioButton_nameNO.Checked=true;





but nothing seems to help

please..give me some advice
 
Back
Top