var resultingQuery = from instructors in dtResources.AsEnumerable() join bookings in dtBookingInfo.AsEnumerable() on instructors.Field<String>("resource1") equals bookings.Field<String>("resource1") into AllInfo from bookings in AllInfo.DefaultIfEmpty() select new { resource1 = instructors.Field<String>("resource1") }; return resultingQuery.CopyToDataTable<DataRow>();The last line is wrong and doesn't compile and I can not get CopyToDataTable to show up in intellisense. I am wondering if there is any other way to move result of the query into a data table? Since I am creating a new anonymous type I suspect I am out of luck, right? The reason is I need to pass a data table to the method that generates my final result as a string.
select I.instr_id as resource1, I.fname, I.lname, I.CheckedIn, ; b.booking_id, b.start_time, b.end_time, b.flex_tspan, ; b.layer, b.backcolor, b.forecolor, b.clip_sp, b.clip_loc, ; padr(space(iif(b.locked,2,0))+iif(empty(b.department+b.category+b.item), ; replicate('**'+alltrim(b.lsndescrip)+'** ',40), ; alltrim(b.modifiers)+' '+proper(alltrim(b.gst_name))+' '+alltrim(b.lsndescrip)+' '+ ; alltrim(str(b.booking_id,16))),200) as display_msg, 'PVT' as bartype, b.locked, ; iif(nvl(b.notelength,0)>0, .t., .f.) as isnotes; from csrInstr2 I; left outer join csrBookInfo b on I.instr_id==b.resource1 ; into cursor csrRetCursor ; order by &lcOrderI found this blog post http://blogs.msdn.com/b/aconrad/archive/2007/09/07/science-project.aspx which is above my head :(