private void button3_Click(object sender, EventArgs e)
{
if (textBox2.Text != "" & listBox1.SelectedIndex != -1)
{
string q = "update info set name='" + textBox2.Text.ToString() + "' where id " + listBox1.SelectedItem.ToString();
dosomething(q);
textBox2.Text = "";
}
}
private void dosomething(String q)
{
try {
cn.Open();
cmd.CommandText = q;
cmd.ExecuteNonQuery();
cn.Close();
loaddata();
}
Whenever I try to update a data from MS Access using my program I get this error:

Is there something wrong with my code?