Update DataSet's row thru code

  • Thread starter Thread starter Happy
  • Start date Start date
H

Happy

hi

how to update dataset's row
thru code
i got the new row as a data row in which the primary key remains the same
but was unable update the non primary keys

Thanks in Advance
 
Hi Happy.
how to update dataset's row

In a lot of ways, to give you three methods typed here watch typos (the
dataname of the dataset used is ds)

first method
\\\
dim dr as datarow = ds.tables(0).rows(myrowpointer) ' this only set a
reference
dr("myfirstfield") = 1
dr("mysecondfield") = 2
////
another method
\\\\
ds.tables(0).rows(myrowpointer)("myfirstfield) = 1
ds.tables(0).rows(myrowpointer)("mysecondfield") = 2
////
another method using a dataview (dv)
\\\\
dv(myrowpointer)("myfirstfield") = 1
dv(myrowpointer)("mysecondfield") = 2
///
I hope this helps a little bit?

Cor
 
Back
Top