Guest User

Guest User

  • Tech Writer
  • 529
  • 41.3k

Update values from one column in same table

Jun 4 2021 2:59 AM
 
THis Is My Code Please Edite This Code 
  1. if (msf.Text != "")  
  2. {  
  3. cmd = new SqlCommand("insert into tbl_sinking(CHARG) values(@charg)", sqlcon);  
  4. sqlcon.Open();  
  5. cmd.Parameters.AddWithValue("@charg", msf.Text);  
  6. cmd.ExecuteNonQuery();  
  7. sqlcon.Close();  
  8. MessageBox.Show("Record Inserted Successfully");  
  9. DisplayData();  
  10. ClearData();  
  11. }  
  12. else  
  13. {  
  14. MessageBox.Show("Please Provide Details!");  

Answers (3)