Hi
I am trying to extract the values from a table and populate a virtual table, which is working fine, however I then want to take those values and populate an array, unfortunately I keep getting the values 1 and 3 for some reason, instead of the values in the actual table,
I would be grateful for any advice.

_product.versionid = _productversionid ' get the select record version id
_dsDataSet = _product.ProductSQL(Cls_Products.ProductDetails.ProductChildFormulas) 'select the child formula id's
Dim dt As New DataTable("formulatable") 'create a virtual table
dt.Columns.Add("versionchildid") 'create a virtual column to hold child formula id's
For Each dr As DataRow In _dsDataSet.Tables("product").Rows 'select all the child id's
dt.Rows.Add(New Object() {dr("childproductversionid")}) 'and add them to the table
Next 'move to the next record
If dt.Rows.Count > 0 Then 'if any rows are returned, we can create an array to query the formula version table
Dim dataList As New ArrayList
For Each dr As DataRow In dt.Rows 'for each row in table add the value to the array

dataList.Add(dr.Item(0))
MsgBox(dataList.Add(dr.Item(0)).ToString)
Next