> Public oDataSet As DataSet = New DataSet > Public oRows As DataRowCollection = Nothing > Private oDataView As DataView = New DataView > > oDataSet.Tables.Add("Temp") > > oDataSet.Tables(0).Columns.Add("Extension", GetType(System.String)) > oDataSet.Tables(0).Columns.Add("LastUpdate", GetType(System.DateTime)) > oDataSet.Tables(0).Columns.Add("Name", GetType(System.String)) > oDataSet.Tables(0).Columns.Add("Size", GetType(System.Int32)) > oDataSet.Tables(0).Columns.Add("JustName", GetType(System.String)) > oDataSet.Tables(0).Columns.Add("CreationTime", GetType(System.DateTime)) > > ' Create the view > oDataView = oDataSet.Tables(0).DefaultView > > ' Sort the dataset into the primary key > oDataView.Sort = "Name" > > ' Make oRows available > oRows = oDataSet.Tables("Temp").Rows() > > ' For each record > For lnCounter = 0 To nCount - 1 > loRow = oRows(lnCounter) > > Next >I was referring to the code in the second (SQL) example (comparing working to non-working versions)