XCLN: SELECT Statement Containing ORDER BY "DAV:href" Not Supported (255586)



The information in this article applies to:

  • Microsoft Exchange 2000 Server
  • 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:
'80040e31'
Execution stopped because a resource limit was reached. No results were returned.

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
				

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kberrmsg kbprb KB255586