axman1000 0 Newbie Poster

I have a list of values extracted from a datareader in a list. Is it possible for me to run a query to extract another set of values using a datareader and then use the individual values in the list and the values in the datareader to perform some calculation, and possibly use the item values in a query itself?

The code snippet is as follows:

Dim prev_ob As New List(Of Int64)
con = New OleDb.OleDbConnection("provider=SQLOLEDB;data source=pc;initial catalog=DB1;integrated security=SSPI")
cmd = New OleDbCommand("query", con)
r = cmd.ExecuteReader
While r.Read
End While

I will be running another query and retrieve another set of values using a datareader. How can I use the items in this list and the ones I retrieve using the datareader and perform some mathematical calculation and possibly use it in a query? Thanks!