BeginEdit/EndEdit doesn't update row

  • Thread starter Thread starter Anil Gupte/iCinema.com
  • Start date Start date
A

Anil Gupte/iCinema.com

I have the following code:
Dim strContentInfo As String = "ContentID='" & CUID & "'"

Dim drContentInfo As DataRow() =
GlobalDataSet.Tables("PaidContent").Select(strContentInfo)

<Some other stuff happens here to set NumPlays>

drContentInfo(0).BeginEdit()

drContentInfo(0).ItemArray(2) = NumPlays

drContentInfo(0).EndEdit()

drContentInfo(0).AcceptChanges()

GlobalDataSet.AcceptChanges()


However the values in the dataset or even the datarow are not changing. No
errors. I stepped through it to see what was happening and I coud not find
any problems. The HasErrors on the row is false, the RowError = "", but the
RowState says "Unchanged". What is wrong here?

TIA,
 
Anil,

I don't know what is changed, but with acceptchanges you set the rowstates
to unchanged (and removes the rows which are marked to delete.

Cor
 
Back
Top