whats the best way to increase the slected sql value by a vb.net integer variable
should i first get the value of the cell i want to increase, or there is a way to do the increment using a single command?
one thing i am not sure of is how can i save the value to a vb.net integer variable
here is what i have so far
sqlcmd.CommandText = "SELECT Suppbackorder FROM products WHERE catalogid=@catalogid"
sqlcmd.Parameters.Add(New SqlParameter("@catalogid", someid))
It’s not at all obvious which value you want to increase by a specified amount, here is something that may help guide you (excuse my rusty VB):
As you can see your
WHEREclause remains the same, all we do is change theSELECTto anUPDATE.