Does Updating a Dataview on a table update the table?

  • Thread starter Thread starter STom
  • Start date Start date
S

STom

If I create a dataview like this:

Dim _ldv As DataView
Dim _laRow As DataRow()

_ldv = New DataView(Me.FinanceDataset.Tables("DepreciationYear"))
_laRow = _ldv.Table.Select("DepreciationID = '" & Me.DepreciationID.ToString
& "' AND DepreciationTypeID = 1")

and then later...update the row from the row array:

For Each _lRow In _laRow
_lRow.Item("Residual") = Me.DepYrStraightLine.Residual
Next

Is the datatable itself updated or only the representation of the view?

Later in the code, I use a dataadapter to do the updates to the database.

Thanks.

STom
 
Hi STom,

The data might be buffered at row level when using BeginEdit until EndEdit.
 
Back
Top