este es mi codigo que uso haber si me pueden ayudar, solo tengo la instruccion editar ojala me puedan ayudar gracias desde ya
Código PHP:
da.UpdateCommand.CommandText = "UPDATE cuenta SET enero = @enero ,eneroreal = @eneroreal where enero=@enero"
da.UpdateCommand.Parameters.AddWithValue("@enero", DataGridView1.CurrentRow.Cells("enero").Value)
da.UpdateCommand.Parameters.AddWithValue("@eneroreal", DataGridView1.CurrentRow.Cells("eneroreal").Value)
da.UpdateCommand.Connection = miconexion
DataGridView1.Update()
ds.Tables.Add("cuenta")
da.SelectCommand = da.UpdateCommand
da.Fill(ds.Tables("cuenta"))
DataGridView1.DataSource = ds.Tables("cuenta")
MessageBox.Show("Se Actualizo el registro con exito")