Hi guys!
I cant copy the results of a LINQ query to a Dataset using the CopyToDatatable extension, it works fine for untyped datatables:
Dim q_resasesor = (linq )
Dim qtable
As DataTable = q_resasesor.CopyToDataTable()
How can i use it to copy data to an existing TYPED datatable?
i tried the next code but get an error … “existing column”
Dim dtpreind
As DSRHPROD.PREINDICDataTable
dtpreind = dsrhprod.PREINDIC
q_resasesor.CopyToDataTable(dtpreind, LoadOption.PreserveChanges)
Is there another way to copy data from untyped datatable1
to an my TYPED ds.datatable2
Untyped Datatable1 has five fields:
[ f1, f2, f3, f4, f5 ]
Typed Ds.datatable2 has twelve fields:
[ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12 ]
If I use merge, get an error about null fields!!!
Thanks in advance!!!