How do I return the row where an error occurred in a DataSet with HasErrors = True

T

Tim Frawley

I am interested to know if it is possible to find the row where the
error occurred in a dataset that has changes. I would assume that if
many changes took place on different rows in the dataset this may be
difficult. Does anyone have a suggestion?
 
S

Scot Rose [MSFT]

You would need to check each datarows HasErrors property

Something like this (pseudocode)

Dim DS As New DataSet()
Dim dr As DataRow
For X = 0 To DS.Tables(0).Rows.Count
dr = DS.Tables(0).Rows(1)
If dr.HasErrors = True Then
'Do something
End If
Next x



Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
 

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