I've a windows form in vb.net called Customers orders (partno,name,orderedquantity)
When I fill all the texts with it's data Pay attention to the txt of( the ordered quantity ) ,then I press the oreder button which save the entered data to it's table in the DB.
How can I make the (avaliablequantity) column in the other table (parts) updates it's selfe according to the ordered quantity.
I made an update query in the Access which update the table just when I click on it here it's( .
Please help me how can I make the update process work through the following code of the Customerorders .
Expand|Select|Wrap|Line Numbers
- Dim as strcon
- Try
- Strcon="provider=Microsoft.jet.oledb.4.0;data source=Sales.mdb"
- Dim con as new oledbconnection(Strcon)
- Con.open
- Dim cmd as new oledb command
- cmd.commandtext=" insert into parts (orderno,partno,orderedquantity)values(" & textbox1.text & "," & textbox2.text & "," & textbox3.text & ")"
- cmd.executenonqeur
- con.close
- catch exp as exception
- msgbox(exp.tostring)
- end try