So far I have this code updating only 1 row but is there a way to specify the three rows? (3 different ID's)
Public Shared Sub UpdatePrice(ByVal NewPrice As Decimal, ByVal id As Integer)
Dim dtoffenseinfo As New DataTable
If Not DBConnection.State = ConnectionState.Open Then
'open connection
DBConnection.Open()
Else
End If
cmd.Connection = DBConnection
cmd.CommandText = "UPDATE tblStockPrice " & _
" SET Price=" & NewPrice & " WHERE id=" & id & ""
cmd.ExecuteNonQuery()
DBConnection.Close()
End Sub
I assume I need 2 more parameters for the other two rows and that would be fine.