I am getting this error : "Error 102 : non-boolean type specified in a context where a condition is expected" for this request : private void button2_Click(object sender, EventArgs e)
{
    con.Open();
    SqlCommand cmd = con.CreateCommand();
    cmd.CommandType = CommandType.Text;
    cmd.CommandText = &quot;delete from MYDB where First name='&quot; + first.Text + &quot;'&quot;;
    cmd.ExecuteNonQuery();
    con.Close();
    disp_data();
    MessageBox.Show(&quot;Contact deleted successfully&quot;);
}
You can solve it by putting First name between brackets:
delete from MYDB where [First name]='&quot; + first.Text + &quot;'&quot;;



create table t (id int, [First name] varchar(100));
insert into t values (1, 'John Doe');
GO
delete from t where First name = 'John Doe';
GO


Msg 4145 Level 15 State 1 Line 1
An expression of non-boolean type specified in a context where a condition is expected, near 'name'.


db&lt;&gt;fiddle here