using dataView to sort dataSet

littlefoot

New member
Joined
Oct 16, 2007
Messages
4
Programming Experience
3-5
Can anyone indicate why the following code is not providing a sorted list of the dataSet?

tabPg.controls.add(myListBox)
sql="select * from tblRes"
dsRes1.Clear
DaRes.SelectCommand.CommandText=sql
DaRes.Fill(dsRes1)

Dim myDV as new DataView

myDV.Table=dsRes1.Tables("tblRes")
myDv.RowStateFilter=DataViewRowState.CurrentRows
myDv.Sort="fldLName DESC"

for jj = 0 to myDV.count-1
myListBox.items.Add(myDv.TblRes(jj).fldLName & " " & myDV.fldFName(jj))
next
 
Back
Top