Dim conn As New SqlConnection(''''YourConnectionStringHere) Dim cmd As New SqlCommand Dim dr As SqlClient.SqlDataReader With cmd .Connection = conn .CommandType = CommandType.Text .CommandText = "SELECT ExeName FROM tProcessNames" .Connection.Open() dr = .ExecuteReader(CommandBehavior.CloseConnection) While dr.Read buildProcess(dr.Item("ExeName").ToString) End While End With dr.Close() If I understand you right that should do it. Hope it helps
D
DannyB79
@DannyB79