title: Updating data in gridview using vb.net
body: <p>First I populated the datagridview by data of sqlserver 2008 database table, now i have muliple rows in datagridview containing data, i am trying to update any row but, in the database table it replaces other rows data by the row data that iam trying to update
   the code for update statement is given below</p>
  
  <p>Plz help me</p>
  
  <pre><code>Dim cmd As New SqlCommand("Update EmployeeDetail Set Salary = '" &amp;      
  dgvEmpDetail.Rows(0).Cells(1).Value &amp; "', Experience ='" &amp;  
  dgvEmpDetail.Rows(0).Cells(2).Value &amp; "', Skills='" &amp;  
  dgvEmpDetail.Rows(0).Cells(3).Value 
  &amp; "' where Emp_ID = '" &amp; dgvEmpDetail.Rows(0).Cells(0).Value &amp; "'", con)
  con.Open()                                                         
  cmd.ExecuteNonQuery()     
  con.Close()
  </code></pre>