tag:blogger.com,1999:blog-7287163895351207666.post7767085696836608367..comments2018-05-17T00:12:14.341-07:00Comments on Adventures in VBScript: Q: How do I sort data in an Array? (Part 2)Corey Thomashttp://www.blogger.com/profile/02437257260706901559noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7287163895351207666.post-40202406648704558792008-03-24T08:03:00.000-07:002008-03-24T08:03:00.000-07:00That's a good point Paul. There is no real good w...That's a good point Paul. There is no real good way to add multi-dimensional arrays (or arrays within arrays). <BR/><BR/>Good tip on the GetRows method. I'll look at adding that in!Corey Thomashttps://www.blogger.com/profile/02437257260706901559noreply@blogger.comtag:blogger.com,1999:blog-7287163895351207666.post-83303993327235706112008-03-20T12:55:00.000-07:002008-03-20T12:55:00.000-07:00I like using disconnected recordsets for sorting m...I like using disconnected recordsets for sorting multidimensional arrays. It would be nice if your script mentioned how easy it is to sort multidimentsional arrays on any column with the recordset object. For one dimensional arrays, many users already have the dot net stuff installed to use a much smaller sorting script:<BR/><BR/>Function SortNet(a1DArray)<BR/>Dim i, DataList<BR/>Set DataList = CreateObject _<BR/> ("System.Collections.ArrayList")<BR/>For i = 0 To UBound(a1DArray)<BR/> DataList.Add a1DArray(i)<BR/>Next <BR/>DataList.Sort()<BR/>SortNet = DataList.ToArray<BR/>End Function<BR/><BR/>It really gripes me that there is no easy way to add an entire single or multidimensional array to the dot net DataList or to a recordset. I think your script should have used the fast, easy way to return the sorted data as an array; the recordset's GetRows property/method returns an array.<BR/><BR/>-Paul RandallAnonymousnoreply@blogger.com