C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to Get Errors in dataset


Posted Date: 03 Jun 2008    Resource Type: Code Snippets    Category: Databinding

Posted By: Kumar Velu       Member Level: Diamond
Rating:     Points: 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  
(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!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

efax

Contact Us    Privacy Policy    Terms Of Use