[Mono-bugs] [Bug 672050] Inconsistency - Data binding to the empty datatable

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 6 07:33:19 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=672050

https://bugzilla.novell.com/show_bug.cgi?id=672050#c9


--- Comment #9 from Marcin Kral <mkral at sygnity.pl> 2011-05-06 11:33:17 UTC ---
Hello, 

Ok, I've took a look on Telerik's code. Here's the demo: 

static public void Main()
{
   var dataTable = new DataTable();
   dataTable.Columns.Add("n", typeof(string));
   var view = dataTable.AsDataView();
   Console.WriteLine(view.Count);
   return;        
}

Under Ms.NET it shows 0. Under Mono I've got exception similar to this one
above. Mono's implementation of CopyToDataTable is ok. Problem occurs when you
try to get DataView from empty DataTable; under MS.NET it returns just an empty
view.


(In reply to comment #8)
> Hello, 
> 
> I'm not sure about which sample you'r asking? Anyway, probably you and
> documentation are right but MS' implementation seems to throw IOE only when the
> source table is null, not when it contains no rows. I'll try to prepare a more
> concise demo. 
> 
> Best regards,
> Marcin
> 
> (In reply to comment #6)
> > Hey Marcin,
> > 
> > #655504 was closed as a duplicate of this bug.  Can you confirm the behavior by
> > running the sample, not using telerik controls, in .Net 2.0 and 3.5?
> > 
> > If 2.0's behavior is to raise exception, I may #if it out to behave
> > accordingly.  Don't want to end up regressing 2.0 apps.
> > 
> > Hope you understand.  :-)
> > 
> > (In reply to comment #5)
> > > (In reply to comment #3)
> > > > Can you run a sample against .Net 2.0 and check whether the exception is raised
> > > > or not? Because, if it works in 2.0, the code has not changed much in recent
> > > > times. 
> > > 
> > > Telerik is using different code paths for .NET 2.0 and .NET 3.5; that's why
> > > this error occurs only with Telerik's 3.5 DLL. Anyway, I'm not sure why the
> > > #655504 is marked as resolved. The InvalidOperationException is still thrown
> > > when the source contains no rows.
> > > (https://github.com/mono/mono/blob/mono-2-10/mcs/class/System.Data.DataSetExtensions/System.Data/DataTableExtensions.cs#L65).
> > > 
> > > Kind regards,
> > > Marcin

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list