Article ID: 255586
Article Last Modified on 2/26/2007
APPLIES TO
- Microsoft Exchange 2000 Server Standard Edition
- Collaboration Data Objects for Exchange 2000
This article was previously published under Q255586
SYMPTOMS
When you run a SELECT statement that contains ORDER BY "DAV:href", you may receive the following run time error message:
CAUSE
Sorting by "DAV:href" is not supported currently because it is a non-indexed column.
MORE INFORMATION
Code Sample to Reproduce the Problem
'make a reference to Microsoft ActiveX Data Objects 2.5 Library and 'Active DS Type Library Private Sub OrderByHref_Click() Dim Info As New ADSystemInfo Dim sDomainName As String Dim sUserName As String Dim sURL As String Dim sSQL As String Dim Rs As New ADODB.Recordset Dim Rec As New ADODB.Record sDomainName = Info.DomainDNSName sUserName = "UserName" sURL = "file://./backofficestorage/" & sDomainName & "/MBX/" & sUserName & "/Inbox" Rec.Open sURL ' use default shallow traversal sSQL = "Select " sSQL = sSQL & " ""DAV:displayname"" " sSQL = sSQL & ", ""DAV:href"" " sSQL = sSQL & " from """ & sURL & """ " sSQL = sSQL & "order by ""DAV:href"" " Rs.Open sSQL, Rec.ActiveConnection If Not Rs.EOF Then Rs.MoveFirst End If While Not Rs.EOF Debug.Print Rs.Fields("DAV:displayname").Value Rs.MoveNext Wend Rs.Close Rec.Close End Sub
Additional query words: exch2kp2w CDOEX
Keywords: kberrmsg kbprb KB255586