Connect bugs scare me
Posted
Fri, Jul 13 2007 2:50
by
bill
I was just reading Roger Jennings blog and note he logged a bug in Orcas. What scared me was the response Roger got.
It seems his bug was acknowledged pretty quickly, and some 5 hours later they said :
Thanks for your feedback. We have reproduced this bug on Visual Studio Codename Orcas June CTP, and we are sending this bug to the appropriate group within the VisualStudio Product Team for triage and resolution.
Seems good right ? Well not really. The bug was just a simple syntax mistake. The "Of " was missing in the generic parameter. This kind of thing should NOT need triage.
The code was :
Dim Query = From c In dsNwindT.Customers _
Join o In dsNwindT.Orders On c.CustomerID Equals o.CustomerID _
Join d In dsNwindT.Order_Details On o.OrderID Equals d.OrderID _
Join p In dsNwindT.Products On d.ProductID Equals p.ProductID _
Where p.ProductID = 2 AndAlso c.Country = "USA" _
Order By o.OrderID Descending _
Select c.CustomerID, c.CompanyName, o.OrderID, _
ShippedDate = o.Field(Nullable(Of DateTime))("ShippedDate"), _
p.ProductName, d.Quantity
and should have been:
Dim Query = From c In dsNwindT.Customers _
Join o In dsNwindT.Orders On c.CustomerID Equals o.CustomerID _
Join d In dsNwindT.Order_Details On o.OrderID Equals d.OrderID _
Join p In dsNwindT.Products On d.ProductID Equals p.ProductID _
Where p.ProductID = 2 AndAlso c.Country = "USA" _
Order By o.OrderID Descending _
Select c.CustomerID, c.CompanyName, o.OrderID, _
ShippedDate = o.Field(Of Nullable(Of DateTime))("ShippedDate"), _
p.ProductName, d.Quantity
or alternatively using the new syntax:
Dim Query = From c In dsNwindT.Customers _
Join o In dsNwindT.Orders On c.CustomerID Equals o.CustomerID _
Join d In dsNwindT.Order_Details On o.OrderID Equals d.OrderID _
Join p In dsNwindT.Products On d.ProductID Equals p.ProductID _
Where p.ProductID = 2 AndAlso c.Country = "USA" _
Order By o.OrderID Descending _
Select c.CustomerID, c.CompanyName, o.OrderID, _
ShippedDate = o.Field(Of DateTime?)("ShippedDate"), _
p.ProductName, d.Quantity
For the record, the C# code was :
var query = from c in dsNwindT.Customers
join o in dsNwindT.Orders on c.CustomerID equals o.CustomerID
join d in dsNwindT.Order_Details on o.OrderID equals d.OrderID
join p in dsNwindT.Products on d.ProductID equals p.ProductID
where p.ProductID == 2 && c.Country == "USA"
orderby o.OrderID descending
select new { c.CustomerID, c.CompanyName, o.OrderID,
ShippedDate = o.Field<DateTime?>("ShippedDate"),
p.ProductName, d.Quantity };
One thing I will say is the VB team needs to add some greater feedback around the different uses of () in VB. If they have different meaning they should be colored differently or something. It should be obvious. And the error correction should suggest the Of