0

how to deduct qty from data base
i have used this sentex to deduct......

 cm1.CommandText = "update inventory set qty=qty- " & cust_gv.Rows(i).Cells(3).Value() & " where item_name='" & cust_gv.Rows(i).Cells(1).Value() & "'"

this sentex is giveing error

4
Contributors
6
Replies
8
Views
5 Years
Discussion Span
Last Post by thines01
0

What do you mean "deduct"?
Do you want to:
1) change the value by subtracting another value or
2) delete the value or
3) delete the row?

0

i have a data grid view in which there is category , item name ,rate , qty,total.
the qty of that particular item name has to be deducted (minus) from the current qty from inventory(inventory is a database)

0

Row(i) can be used in a loop, so I don't think that has to be the problem.
Can you debug.print or just messagebox cm1.CommandText and let us know the actual statement you try to execute. Also the actual error might help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.