Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to create a datatable from the LINQ?
Message
De
16/08/2013 03:10:33
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01580581
Message ID:
01580595
Vues:
28
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform