0

how to update the different text in vb to the same field in oracle
my code is below

If ar.BOF = False Then
ar.MoveFirst
ar.AddNew
ar.Fields(0) = registernumber1.Text
ar.Fields(1) = name1.Text
ar.Fields(2) = status1.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text

ar.Fields(0) = registernumber2.Text
ar.Fields(1) = name2.Text
ar.Fields(2) = status2.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text

ar.Fields(0) = registernumber3.Text
ar.Fields(1) = name3.Text
ar.Fields(2) = status3.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text

ar.Fields(0) = registernumber4.Text
ar.Fields(1) = name4.Text
ar.Fields(2) = status4.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text

ar.Fields(0) = registernumber5.Text
ar.Fields(1) = name5.Text
ar.Fields(2) = status5.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text

ar.Fields(0) = registernumber6.Text
ar.Fields(1) = name6.Text
ar.Fields(2) = status6.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text

ar.Fields(0) = registernumber7.Text
ar.Fields(1) = name7.Text
ar.Fields(2) = status7.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text

ar.Fields(0) = registernumber8.Text
ar.Fields(1) = name8.Text
ar.Fields(2) = status8.Text
ar.Fields(3) = Form9.batch.Text
ar.Fields(4) = Form9.year.Text
ar.Fields(5) = Form9.department.Text
ar.Fields(6) = Form9.semester.Text
ar.Fields(7) = Form9.section.Text
ar.Fields(8) = Form9.currentdate.Text
ar.Fields(9) = Form9.subjectcode.Text
ar.Fields(10) = Form9.facultyname.Text
ar.Update
MsgBox "UPDATED SUCCESSFULLY"
ar.Close
ar.Open "commit"
End If

reply fast

2
Contributors
1
Reply
4
Views
6 Years
Discussion Span
Last Post by debasisdas
0

You need to update after adding each set of values otherwise only the last bunch of values will over write all other previous values.

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.