rowstate.deleted

  • Thread starter Thread starter Albert
  • Start date Start date
A

Albert

Does anyone know if it is possible to get information out of a datarow which
has been deleted?

Thanks,

Albert
 
Dim d As New DataTable
Dim deletedRows As DataRowCollection

d.DefaultView.RowStateFilter = DataViewRowState.Deleted

deletedRows = d.Rows

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 
Albert said:
Does anyone know if it is possible to get information out of a datarow which
has been deleted?

Thanks,

Albert
as long as you did not call the AcceptChanges method of the datarow.

Example accessing the data in Column idx of DataRow Row:
If Row.HasVersion(DataRowVersion.Original) Then
Debug.WriteLine(Row(idx, DataRowVersion.Original))
End If
 
This will only give me a collection of deleted rows, i need to see what data
is in the rows which are deleted
 
Doesnt work, i tried following

I delete a row e.g.

dim dtchanges as datatable

dtchanges=dtmain.select(smt=smt)

for each drow in dtchanges
drow.delete
next

etc.

now when i try to get info out of the deleted rows i get an error
I read a row like this.

dim dtdeleted as datatable = dtmain.detectchanges

for each drow in dtdeleted
msgbox drow(0) <----- Error here
next
 
Ok now I see what you mean,

it is the "DatarowVersion.Original". That'll do the trick, thanks!

Albert
 

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

Back
Top