mahmud_uk

mahmud_uk

  • NA
  • 48
  • 0

Update Query

Aug 5 2004 11:14 AM
I have this form where it retrives information from the database to its appropiate textBox, checkBox etc. Now i want the update action to function. If i amend any fields i.e. Text, check etc and press the update button, i want the change to take place in the form as well as the database. I'm stuck on this section now, i done a brif script but keeps on throughing error: String sUpdate = "Update * FROM License SET Name = '" + textBox1.Text.ToString() + "', AllowPlayOnPC ='" + checkBox1.Checked + "'" + "WHERE Name = '"+ textBox5.Text +"' AND LicenseID = '"+ textBox6.Text +"'"; SqlCommand cmd = new SqlCommand(sUpdate, con); con.Open(); SqlDataReader dr = cmd.ExecuteReader(); con.Close(); Can anyone direct me what i should do now. Thanks, Mac

Answers (4)