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 | = <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 | 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 | 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 = | sUserName = "UserName" | ||
sURL = | sURL = "file://./backofficestorage/" & sDomainName & "/MBX/" & sUserName & "/Inbox" | ||
Rec.Open sURL | Rec.Open sURL | ||
' use default shallow traversal | ' use default shallow traversal | ||
sSQL = | sSQL = "Select " | ||
sSQL = sSQL & | sSQL = sSQL & " ""DAV:displayname"" " | ||
sSQL = sSQL & | sSQL = sSQL & ", ""DAV:href"" " | ||
sSQL = sSQL & | sSQL = sSQL & " from """ & sURL & """ " | ||
sSQL = sSQL & | 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( | 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:
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