narasiman rao

narasiman rao

  • NA
  • 519
  • 766k

When Updating error occurs

Nov 19 2012 2:39 AM
when  i inserting a radio button error occurs please help me.Code as follows;



private void button1_Click(object sender, EventArgs e)
{
con.Open();
 SqlCommand cmd2 = new SqlCommand("Update diesel set Billno = '" + cb_billno.Text + "',Date = '" + dateTimePicker1.Text + "',Dieselcost = " + textBox1.Text + ",Dieselservice=" + txt_dieselservice.Text + ",Servicetax= " + txt_servicetax.Text + ",Educess = " + txt_educess.Text + ",Addcess = " + txt_addcess.Text + ",Sertax= " + txt_sertaxtot.Text + ",Totbill= " + txt_totbillvalue.Text + " ,Flag='" + radioButton1.Text+"','" + radioButton2.Text+"' where SNO =  " + cb_sno.Text + "", con);
 cmd2.ExecuteNonQuery();
con.cose();
}

Answers (1)