View Single Post
Join Date: Aug 2008
Posts: 304
Reputation: aktharshaik is an unknown quantity at this point 
Solved Threads: 37
aktharshaik's Avatar
aktharshaik aktharshaik is offline Offline
Posting Whiz

Re: About Updating a Record in adodb

 
0
  #2
Dec 1st, 2008
Corrections
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. rs.Open "Insert Into Deliver (scode, pcode, quantity, unit, amount, pcarrier, pterms, drnumber, date) Values ('" + Combo1.Text + "','" + Combo2.Text + "','" + Text1.Text + "','" + Text2.Text + "','" + Text3.Text + "','" + Text4.Text + "','" + Text5.Text + "','" + Text6.Text + "','" + Text7.Text + "')", cn, adOpenKeyset, adLockPessimistic

must be
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. cn.Execute "Insert Into Deliver (scode, pcode, quantity, unit, amount, pcarrier, pterms, drnumber, date) Values ('" + Combo1.Text + "','" + Combo2.Text + "','" + Text1.Text + "','" + Text2.Text + "','" + Text3.Text + "','" + Text4.Text + "','" + Text5.Text + "','" + Text6.Text + "','" + Text7.Text + "')"


and

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. rs1.Open "select * from Product where pcode='" & Combo2.Text & "'", cn, adOpenKeyset, adLockPessimistic

must be

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. rs1.Open "select * from Product where pcode='" & Combo2.Text & "'", cn, adOpenDynamic, adLockOptimistic

remove the statement
[code[
rs.close
[/code]



Regards
Shaik Akthar
Last edited by aktharshaik; Dec 1st, 2008 at 9:07 am.
Reply With Quote