Article ID: 255586 - Last Review: February 26, 2007 - Revision: 2.4
XCLN: SELECT Statement Containing ORDER BY "DAV:href" Not Supported
This article was previously published under Q255586
On This Page
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.
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
Note: This article is from Microsoft Knowledage Base
Related problems posted by other users | |
| more... |

