Sorting Datatable

  • Thread starter Thread starter scorpion53061
  • Start date Start date
S

scorpion53061

I have a datatable in which the adapter has not been updated (and I dont
intend to) and I want to stop after adding the rows to the datatable and
sort them by lets say the SLSM column DESC. Usually I would when calling
data sorted in a SQL server table would use a select statement but how would
I do this when all it is is a dataset with all the rows added?

If I have to I will update the data adapter and add all the rows to the
datatable but I would rather not do that if I do not have to.

Thanks for your help......

Me.Dshistory1.HISTORY.Rows.Add(drnew)'row

dshistory1.acceptchanges

End If

Loop

'now sort this dataset(datatable) as I get ready to do actions
 
Sure,
myDataSet.Tables("myTableName").DefaultView.Sort = "dateofbirth DESC"

hth
--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top