I want to update the UsageTime
when the time ticks per minute, couldn't get the right code.
Private Sub LBLTime_TextChanged(sender As Object, e As EventArgs) Handles LBLTime.TextChanged
con.ConnectionString = My.Settings.Finals_DBConnectionString
cmd.Connection = con
con.Close()
con.Open()
cmd.CommandText = "update tbl_transaction set usagetime = @ut, remainingtime = @rt"
cmd.Parameters.Clear()
cmd.Parameters.AddWithValue("ut", +1)
cmd.Parameters.AddWithValue("rt", -1)
cmd.Parameters cmd.ExecuteNonQuery()
End With
End Sub
try this.
Also don't see any "where" in your sql. It's not a good practice