i can't update my data at database
this my code :
VB.NET Code:
  1. Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
  2.         Try
  3.             'Dim ds As New DataSet
  4.             Dim scmd As New OleDbCommand
  5.             If bAdd Then
  6.                 scmd.CommandText = "insert into inv_t_products (prod_id,prod_name,unit,unitprice) " & _
  7.                         "values(@prodid,@prodname,@unit,@unitprice)"
  8.             Else
  9.                 'modify
  10.                 scmd.CommandText = "update inv_t_products set prod_name=@prodname,unit=@unit,unitprice=@unitprice " & _
  11.                     "where prod_id=@prodid"
  12.             End If
  13.  
  14.             scmd.Parameters.Add(New OleDbParameter("@prodid", txtKd.Text))
  15.             scmd.Parameters.Add(New OleDbParameter("@prodname", txtNm.Text))
  16.             scmd.Parameters.Add(New OleDbParameter("@unit", txtSat.Text))
  17.             scmd.Parameters.Add(New OleDbParameter("@unitprice", txtHarga.Text))
  18.  
  19.             scmd.Connection = dbConn
  20.             scmd.ExecuteNonQuery()
  21.             bUpdated = True
  22.  
  23.             Me.Close()
  24.  
  25.         Catch ex As Exception
  26.             ERRDesc(ex)
  27.         End Try
  28.  
  29.         MsgBox("Saved", MsgBoxStyle.Information)
  30.  
  31.     End Sub

i have problem when update data, data not updated.

how the solution ?

thank you