Failed to project selection

Jun 3, 2009 at 3:51 PM

Hi.  Can you give me some idea as to why this doesn't work?  The objective is to get all quote details for a particular quote.

It executes through the first quote in "quotes" twice then fails on the line in bold via "ExecuteQuery" with an error of "Failed to project selection.".

Or, perhaps there's a better way of doing this.

Any help is greatly appreciated.

            // So for each quote, get all the quotedetails for that quote
            string eachQuote=String.Empty;
            var quotes = from q in p.Linq<quote>()
                         select q;
            foreach (var quote in quotes)
                eachQuote = quote.quoteid.Value + " ";
                var quoteDetails = from qd in p.Linq<quotedetail>()
                                   where qd.quoteid.Value == quote.quoteid.Value
                                   select qd;
                foreach (var quoteDetail in quoteDetails)
                    eachQuote = eachQuote + quoteDetail.productdescription + " ";