Microsoft KB Archive/255586: Difference between revisions

From BetaArchive Wiki
m (Text replacement - "&" to "&")
m (Text replacement - """ to """)
 
Line 12: Line 12:
<div id="TitleRow">
<div id="TitleRow">


= <span id="KB255586"></span>XCLN: SELECT Statement Containing ORDER BY &quot;DAV:href&quot; Not Supported =
= <span id="KB255586"></span>XCLN: SELECT Statement Containing ORDER BY "DAV:href" Not Supported =




Line 50: Line 50:
== SYMPTOMS ==
== SYMPTOMS ==


When you run a '''SELECT''' statement that contains ORDER BY &quot;DAV:href&quot;, you may receive the following run time error message:
When you run a '''SELECT''' statement that contains ORDER BY "DAV:href", you may receive the following run time error message:
<div class="errormessage">
<div class="errormessage">


Line 63: Line 63:
== CAUSE ==
== CAUSE ==


Sorting by &quot;DAV:href&quot; is not supported currently because it is a non-indexed column.
Sorting by "DAV:href" is not supported currently because it is a non-indexed column.


</div>
</div>
Line 86: Line 86:
      
      
     sDomainName = Info.DomainDNSName
     sDomainName = Info.DomainDNSName
     sUserName = &quot;UserName&quot;
     sUserName = "UserName"
      
      
     sURL = &quot;file://./backofficestorage/&quot; & sDomainName & &quot;/MBX/&quot; & sUserName & &quot;/Inbox&quot;
     sURL = "file://./backofficestorage/" & sDomainName & "/MBX/" & sUserName & "/Inbox"
      
      
     Rec.Open sURL
     Rec.Open sURL
      
      
     ' use default shallow traversal  
     ' use default shallow traversal  
     sSQL = &quot;Select &quot;
     sSQL = "Select "
     sSQL = sSQL & &quot; &quot;&quot;DAV:displayname&quot;&quot; &quot;
     sSQL = sSQL & " ""DAV:displayname"" "
     sSQL = sSQL & &quot;, &quot;&quot;DAV:href&quot;&quot; &quot;
     sSQL = sSQL & ", ""DAV:href"" "
     sSQL = sSQL & &quot; from &quot;&quot;&quot; & sURL & &quot;&quot;&quot; &quot;
     sSQL = sSQL & " from """ & sURL & """ "
     sSQL = sSQL & &quot;order by &quot;&quot;DAV:href&quot;&quot; &quot;
     sSQL = sSQL & "order by ""DAV:href"" "
      
      
     Rs.Open sSQL, Rec.ActiveConnection
     Rs.Open sSQL, Rec.ActiveConnection
Line 106: Line 106:
      
      
     While Not Rs.EOF
     While Not Rs.EOF
         Debug.Print Rs.Fields(&quot;DAV:displayname&quot;).Value
         Debug.Print Rs.Fields("DAV:displayname").Value
         Rs.MoveNext
         Rs.MoveNext
     Wend
     Wend

Latest revision as of 13:53, 21 July 2020

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:

'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
                


Additional query words: exch2kp2w CDOEX

Keywords: kberrmsg kbprb KB255586