Dim sql As String = "select * from tableName1 order by columnName1" adapter = New SqlDataAdapter() adapter.SelectCommand = New SqlCommand(sql, connection) adapter.Fill(ds) For Each row As DataRow In ds.Tabels(0).Rows Console.WriteLine(row("columnName1").ToString) Next