TCARPENTER
Programmer
I have a disconnected recordset created from entity coordinates I'm trying to sort using the sort property of the recordset. My problem is the first column is sorted, but second is left alone. Anyone else seen this before?
I'm VB6 with all the latestest service packs and ADO 2.8 (I think with the latest service packs - maybe not)
Here's my code for the disconnected recordset:
Then the recordset get populated from an Array, then sorted with:
But here's what I get:
[tt]
79.1858441635922, 130.252103942296, 0
79.1858441635922, 155.857551744569, 0
79.1858441635922, 132.627103942296, 0
79.1858441635922, 90.6721039422956, 0
[/tt]
I was hoping for (done in Excel):
[tt]
79.1858441635922, 155.857551744569, 0
79.1858441635922, 132.627103942296, 0
79.1858441635922, 130.252103942296, 0
79.1858441635922, 90.6721039422956, 0
[/tt]
Is there something I'm missing? Any help is appreciated.
TIA
Todd
I'm VB6 with all the latestest service packs and ADO 2.8 (I think with the latest service packs - maybe not)
Here's my code for the disconnected recordset:
Code:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
With rs.Fields
.Append "ObjRefKey", adChar, 500
.Append "PntRefKey", adChar, 500
.Append "X", adDouble
.Append "Y", adDouble
.Append "Z", adDouble
End With
Then the recordset get populated from an Array, then sorted with:
Code:
rs.Sort = "X Asc, Y Desc"
But here's what I get:
[tt]
79.1858441635922, 130.252103942296, 0
79.1858441635922, 155.857551744569, 0
79.1858441635922, 132.627103942296, 0
79.1858441635922, 90.6721039422956, 0
[/tt]
I was hoping for (done in Excel):
[tt]
79.1858441635922, 155.857551744569, 0
79.1858441635922, 132.627103942296, 0
79.1858441635922, 130.252103942296, 0
79.1858441635922, 90.6721039422956, 0
[/tt]
Is there something I'm missing? Any help is appreciated.
TIA
Todd