C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Databinding »

How to Get Errors in dataset


Posted Date: 03 Jun 2008    Resource Type: Code Snippets    Category: Databinding
Author: Kumar VeluMember Level: Diamond    
Rating: 1 out of 5Points: 8



Following code helps to get errors in dataset:


Dim drerrors as Datarow,index as integer
if mydataset.Tables("Table1").HasErrors then
drerrors=mydataset.Tables("Table1").GetErrors
for index=0 to drerrors.GetUpperBound(0)
console.WriteLine(drErrors(index).RowError)
Next
Endif

Here GetErrors method of datatable class returns an array of datarows that
contain errors.
haserrors return true value if the table contains errors.
if dataset contains more errors, it would have been more efficent to check
the haserrors method of the dataset rather than checking the haserrors
method of each table.



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Binding Data From Textbox to Dropdown
Previous Resource: How to Get newly added row in dataset
Return to Discussion Resource Index
Post New Resource
Category: Databinding


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use