> ' Sort the dataset into the primary key > oData.oDataView.Sort = "AI" > > ' For each record > For lnCounter = 0 To oData.nCount - 1 > loRow = oData.oRows(lnCounter) > Nextbe:
oData.oDataView.Sort = "AI" > > ' For each record > For lnCounter = 0 To oData.oDataView.Count - 1 > loRow = oData.oDataView.Item(lnCounter) > Next(Haven't checked the exact syntax). Once again: you are looping through the table in the first case - the DataView may as well not exist.
' If we have no record If nCount = 0 Then oRows = Nothing Else oDataView = oDataSet.Tables("Temp").DefaultView oRows = oDataSet.Tables("Temp").Rows() End IfSo, the way oRows is initialized here, is it the same thing as oData.oDataView.Item?