HighTechTalks DotNet Forums  

Bug on DataRow object´s GetColumnsInError method

Dotnet Data Tools microsoft.public.dotnet.datatools


Discuss Bug on DataRow object´s GetColumnsInError method in the Dotnet Data Tools forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Otavio Ferreira
 
Posts: n/a

Default Bug on DataRow object´s GetColumnsInError method - 08-13-2004 , 01:29 PM






According to .NET Framework v1.1 Documentation, the DataRow object´s
GetColumnsInError method gets an array of columns that have errors. This
description made me think, develop and test a .NET Windows Application in a
disconnected scenario.

This application has a WindowsForm with a SqlDataAdapter object that fills a
DataSet object. The resultant relational data is then displayed on a
DataGrid control. At this time, the data can be modified.

In this situation, various instances of the same .NET Windows Application
running simultaneously can generate a System.Data.DBConcurrencyException
when the SqlDataAdapter object´s Update method is called. Note that the
SqlDataAdapter object is configured to use optimistic concurrency.

If this exception occurs, the exception-handling structure´s Catch block can
implement code to show, for example, a friendly message to the user
detailing the accurate cells that had caused the errors.

DataSet, DataTable and DataRow objects have the boolean property HasError
that help developers to find rows with errors. The only information missing
to show in the friendly message is the columns with these errors. To
discriminate only the rows is not enough.

To get these columns, the perfect method would be GetColumnsInError of the
DataRow object. But concurrency exceptions do not set errors in DataColumns
objects. In other words, the GetColumnsInError method do not return any
columns. I assume that this behavior is a bug.

Is there another way to reach this goal?

Thank´s,

Otávio F. Ferreira Filho
[Microsoft Certified Professional]



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.