Updating a boolean field in Access - How?
-
Hi, I have a table within Access DB where all the fields are of text type. Recently I added a new column of boolean (Yes/No) type. The question is how can I update this column ? For the text fields I used the following: int ID = Convert.ToInt32(e.Item.Cells[0].Text); string name_en = ((TextBox)e.Item.Cells[2].Controls[0]).Text; string sql ="UPDATE TableElectric SET NameEn=\"" + name_en+ "\"" + " WHERE ID=" + ID.ToString(); ExecuteNonQuery(sql); What different code should I use for the updating of the boolean (Yes/No) field in my DB ? Thanks.
-
Hi, I have a table within Access DB where all the fields are of text type. Recently I added a new column of boolean (Yes/No) type. The question is how can I update this column ? For the text fields I used the following: int ID = Convert.ToInt32(e.Item.Cells[0].Text); string name_en = ((TextBox)e.Item.Cells[2].Controls[0]).Text; string sql ="UPDATE TableElectric SET NameEn=\"" + name_en+ "\"" + " WHERE ID=" + ID.ToString(); ExecuteNonQuery(sql); What different code should I use for the updating of the boolean (Yes/No) field in my DB ? Thanks.