0 Replies - 367 Views - Last Post: 02 November 2017 - 07:14 PM Rate Topic: -----

#1 Sr.programmer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-November 17

Update a single field in Vb6 using adodc

Posted 02 November 2017 - 07:14 PM

Hi friends,
I want to make an application "Inventory management system". In that i want to update the Quantity field of the table "productinfo" while a purchase some quantities of product from the available product.I tried this code but it updating the BOF record while I purchasing other products.
Dim a, b, c As Long
a = Combo2.Text
c = Text2.Text
If c > a Then
MsgBox "Product is not available with this Quantity."
Else
b = Combo2.Text - Text2.Text
rs.AddNew
rs.Fields(0) = Combo6.Text
rs.Fields(1) = Combo1.Text
rs.Fields(2) = Text2.Text
rs.Fields(3) = Text3.Text
rs.Fields(4) = Text1.Text
rs.Update
Adodc1.RecordSource = "update productinfo set Qty=b where PID='" & Combo6 & "'"
MsgBox "Item added successfully!"
Form3.Show
Unload Me



please help me i am a beginner in programming

Is This A Good Question/Topic? 0
  • +

Page 1 of 1