>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 joinsRight.
I tried implementing the MS documented solution of creating custom CopyToTable method, but this seems to lead to other problems. First warning message I posted. I found I need to set ComVisible(false) to fix that message.
But now I am getting the other warning
Warning 4 "C:\Dev\Siriusware.Middleware\Siriusware.Middleware\bin\Debug\Siriusware.Middleware.dll" does not contain any types that can be registered for COM Interop. Siriusware.Middleware
So, I am not sure if I need to pursue that method or try to figure something else. My end result is to produce a string and the only reason I need a datatable is because the method that generates that string accepts datatable.
If it's not broken, fix it until it is.
My Blog