I have filtered data in a myRawData table where the resulting query will be inserted in myImportedData table. 

The situation is that I am going to have some formatting in the filtered data before I will insert it into myImportedData. 

My question is how to store the filtered data in a list? Because that is the easiest way for me to reiterate over the filtered data.

So far here is my code, It only store 1 data in the list.

```
    Public Sub ImportData()

    Dim con2 As MySqlConnection = New MySqlConnection("Data Source=server;Database=dataRecord;User ID=root;")

    con2.Open()
    Dim sql As MySqlCommand = New MySqlCommand("SELECT dataRec FROM myRawData WHERE dataRec LIKE '%20130517%' ", con2)

    Dim dataSet As DataSet = New DataSet()
    Dim dataAdapter As New MySqlDataAdapter()
    dataAdapter.SelectCommand = sql
    dataAdapter.Fill(dataSet, "dataRec")
    Dim datTable As DataTable = dataSet.Tables("dataRec")

    listOfCanteenSwipe.Add(Convert.ToString(sql.ExecuteScalar()))

    'ListBox1.Items.Add(listOfCanteenSwipe(0))

    End Sub

```

Example of data in the myRawData table is this:

```
    myRawData Table
     --------------------------
    ' id    '    dataRec
     --------------------------
    '  1    '    K10201305170434010040074A466
    '  2    '    K07201305170434010040074UN45   

```

Please help. Thank you. 

EDIT:

What i just want to achieve is to store my filtered data in a list. I used list to loop over the filtered data - and I have no problem with that. 

After storing in a list, i will now segragate the information in the dataRec field to be imported in the myImportedData table.

To add some knowledge, i will format the dataRec field just like below:

```
K07        ----> Loc
20130514   ----> date
0455       ----> time
010        ----> temp
18006D9566 ----> id

```