Does Updating a Dataview on a table update the table?

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
 
M

Miha Markic [MVP C#]

Hi STom,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top