I have a Dictionary(Of String, DataTable), and I want to loop through each entry of the dictionary and add a row to the table. I am using an integer variable (int_Counter) to loop, as I need the current dictionary entry Index for other uses in the workflow. I have tried adding the row using the Add Data Row activity, but when I try to reference the DataTable using MyDictionary.Values(int_Counter) I get the error: “BC30068: Expression is a value and therefore cannot be the target of an assingment.” In other activities, I am able to read from the DataTable using MyDictionary.Values(int_Counter)(0)(0).ToString. Do I need to cast the reference to a DataTable type, and if so how do I do that? Is there a better way to add data to the DataTable that is part of the dictionary?
I got it to work by using MyDictionary(MyDictionary.Keys(int_Counter))
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.