01.
Dim
str
As
String
=
"UPDATE Products SET pro_id=@pro_id,name=@name,unit_price=@unit_price,categories=@categories,detail=@detail,stock=@stock WHERE pro_id=@pro_id"
02.
With
Com
03.
.CommandText = str
04.
.CommandType = CommandType.Text
05.
.Connection = Conn
06.
.Transaction = tr
07.
.Parameters.Clear()
08.
.Parameters.Add(
"@pro_id"
, OleDbType.VarChar).Value = txtproid.Text.Trim()
09.
.Parameters.Add(
"@name"
, OleDbType.VarChar).Value = txtnamep.Text.Trim()
10.
.Parameters.Add(
"@unit_price"
, OleDbType.VarChar).Value = txtpricep.Text.Trim()
11.
.Parameters.Add(
"@categories"
, OleDbType.VarChar).Value = cbbcatp.Text.Trim()
12.
.Parameters.Add(
"@detail"
, OleDbType.VarChar).Value = txtdetailp.Text.Trim()
13.
.Parameters.Add(
"@stock"
, OleDbType.VarChar).Value = txtstock_s.Text.Trim()
14.
End
With
15.
Com.ExecuteNonQuery()