Mehmet Fatih

Mehmet Fatih

  • 857
  • 939
  • 41k

bool value query

Mar 7 2024 4:14 PM

I am getting an error when querying a bool value column in a SQL query. Nothing I try is right. I need help on this.

OleDbCommand cmd1 = new OleDbCommand("select tamamlandi,okulno,adisoyadi from ogrencigorusme WHERE Convert.ToBoolean(tamamlandi) = 1 and okulno = '" + txt_Noara.Text + "'", conn);

OleDbDataReader dr1 = cmd1.ExecuteReader();

my other attempts : tamamlandi=true or tamamlandi= 1


Answers (8)