>>CopyToDataTable needs an IEnumberable of DataRows. We've discussed this before. See message #
1573336. The code I gave you there is basically a simpler and less tested version of what was in the blog post.
>
>I am going to implement it as shown here then
>
>
http://msdn.microsoft.com/en-us/library/bb669096.aspx>
>I copied the code into my project, but now I am getting a warning
>
>Warning 1 Type library exporter warning processing Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.
>
>Googling on this error suggests this workaround:
>
>Make sure you have the ComVisible(false) attribute at the assembly
>level (for example in AssemblyInfo.cs), and then explcitly mark the
>types you want to export to COM with ComVisible(true).
>
>I think I may need to consult with other developers in our company.
From the above link:
Although this is useful, it does not allow tables to be created from a sequence of scalar types, from queries that project anonymous types, or from
queries that perform table joins