Hi, I need help to Retrieve all Rows of a particular column from Datatable and assign it to an DataRow. so I can use that DataRow for next process.
Use the below expression to get only one column dataâŚ
to get Data Table:
TransactionData.DefaultView.ToTable(False,âProductURLâ)
To get Rows
TransactionData.DefaultView.ToTable(False,âProductURLâ).rows
Hi Nived Nambiar, Not exactly an issue but. I need a syntax for to: Get all the Rows of a particular Column (i.e. Column= Country has rows= USA, Russia, India, etc.) and store those columns in a DataRow array object.
Hi,
if you want only âProductURLâ column you can use this:
dt.AsEnumerable.Select(Function(x) x(âProductURLâ))
dt.Select(filter) : this one filter the rows but return the entire row with all columns.
Regards, Gio
it is show the error like : can not assign from type 'system.data.enumerableRowsCollectionâ1 [system.Object] to âSystem.Data.DataRowâ in assign activity.
Did you try below?
Hi,
try to add .ToArray method:
dt.AsEnumerable.Select(Function(x) x(âProductURLâ)).ToArray
Gio
yes but, it is throwing the same errorcan not assign from type 'system.data.enumerableRowsCollectionâ1 [system.Object] to âSystem.Data.DataRow.Array
Because it is datarow collectionâŚ
Why you assigning it to array?
We have For each row to loop through the data row collectionsâŚ
yes but, i need to assign the values of Data Row collections to Data row array
Use the below expression to get only one column dataâŚ
TransactionData.DefaultView.ToTable(False,âProductURLâ).Select It will give you array
Thanks for solving the issue pravin.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.