By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,928 Members | 1,173 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,928 IT Pros & Developers. It's quick & easy.

rowstate.deleted

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

Thanks,

Albert
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Albert wrote:
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
Nov 21 '05 #2

P: n/a
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" <al****@informant.nl> wrote in message
news:cg**********@reader13.wxs.nl...
Does anyone know if it is possible to get information out of a datarow which has been deleted?

Thanks,

Albert

Nov 21 '05 #3

P: n/a
This will only give me a collection of deleted rows, i need to see what data
is in the rows which are deleted
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> schreef in
bericht news:eZ*************@TK2MSFTNGP09.phx.gbl...
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" <al****@informant.nl> wrote in message
news:cg**********@reader13.wxs.nl...
Does anyone know if it is possible to get information out of a datarow

which
has been deleted?

Thanks,

Albert


Nov 21 '05 #4

P: n/a
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
"Erik" <us**@domain.invalid> schreef in bericht
news:Ob*************@TK2MSFTNGP11.phx.gbl...
Albert wrote:
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

Nov 21 '05 #5

P: n/a
Ok now I see what you mean,

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

Albert

"Albert" <al****@informant.nl> schreef in bericht
news:cg**********@reader13.wxs.nl...
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
"Erik" <us**@domain.invalid> schreef in bericht
news:Ob*************@TK2MSFTNGP11.phx.gbl...
Albert wrote:
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


Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.