Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to create a datatable from the LINQ?
Message
From
16/08/2013 03:10:33
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01580581
Message ID:
01580595
Views:
29
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform