var results = from myRow in i_dt.AsEnumerable()
where myRow.Field(“Amount”) > 1000
select myRow;
o_dt = results.CopyToDataTable();
this stage raise the following error: Private: Invoke code: Exception has been thrown by the target of an invocation.
What’s strange to me:
inside Invoke code activity you do not have debug, you do not see i_dt, o_dt values
comment out //o_dt = results.CopyToDataTable(); the error does not appear.
so just tried to modify “Amount” in fake “Amount_sic” and code runs without error.
So i cannot catch up whats wrong with it. Is there a way to troubleshoot it?
If you have The source contains no DataRows. , your datatable doesn’t have rows match your condition. Perhaps you should check count of the rows before using CopyToDataTable method.
)… translated it said “overload not accepted … fields cannot call with those arguments” … “impossible to know parameter of type T” …
Thanks.
Br.
Marco.
much better … thank you
after that the feedback is List(Of DataRow) cannot be converted in List(Of String) … so just switched Result in List(Of DataRow) and no more errors apart this below when encounter dot notation … so converted in Double but still get error … is it something about Culture to set up before ?
Assign: Conversion from string “16.355,25” to type ‘Double’ is not valid.
its about brackets
(From myRow In dtData.AsEnumerable()
Where Double.Parse(myRow(“Amount”).toString.Trim, New CultureInfo(“de-DE”) ) > 1000
Select r = myRow).toList
removed: before Double, after trim for example.
In case of bracket issues just count with finger up / down when its opening and closing. If not all fingers are down, then identify and correct the brackets. For sure also respect method signatures when counting the brackets
stupid me works great, Thansk!
Again, do you know where can I found any LINQ reference in VB scope (even if c@ preferreble) ?
e.g. I do not understand the following statement … Select r = myRow).toList … “r” where it come from ?
Tkx.
Marco.