470,636 Members | 1,582 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

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

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?
Nov 19 '05 #1
1 1191
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 : sc***@online.microsoft.com <Remove word online. from address>

This posting is provided ďAS ISĒ, with no warranties, and confers no rights.


--------------------
From: ti*********@fishgame.state.ak.us (Tim Frawley)
Newsgroups: microsoft.public.dotnet.languages.vb
Subject: How do I return the row where an error occurred in a DataSet with HasErrors = True
Date: 21 Aug 2003 10:36:55 -0700
Organization: http://groups.google.com/
Lines: 4
Message-ID: <bf*************************@posting.google.com>
NNTP-Posting-Host: 146.63.252.53
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1061487417 11183 127.0.0.1 (21 Aug 2003 17:36:57 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: 21 Aug 2003 17:36:57 GMT
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!news.maxwell.syr.ed u!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com! postnews1.google.com!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:129477
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

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?

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by compuglobalhypermeganetz0r | last post: by
2 posts views Thread by Chuck Ritzke | last post: by
13 posts views Thread by Edward Mitchell | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.