Microsoft KB Archive/246567: Difference between revisions
m (Text replacement - ">" to ">") |
m (Text replacement - "&" to "&") |
||
Line 85: | Line 85: | ||
The following is a script that works properly when you do a single server query: | The following is a script that works properly when you do a single server query: | ||
<pre class="codesample">srvname = "myserver" | <pre class="codesample">srvname = "myserver" | ||
userDN = "LDAP://" & | userDN = "LDAP://" & srvname | ||
Set ADOConn = CreateObject("ADODB.Connection") | Set ADOConn = CreateObject("ADODB.Connection") | ||
Line 93: | Line 93: | ||
Set adoCom2.ActiveConnection = ADOConn | Set adoCom2.ActiveConnection = ADOConn | ||
adoCom2.CommandText = "<" & | adoCom2.CommandText = "<" & userDN & ">;(home-mdb=*);cn;subtree" | ||
adoCom2.Properties("Page Size") = 16 | adoCom2.Properties("Page Size") = 16 | ||
adoCom2.Properties("Timeout") = 1 | adoCom2.Properties("Timeout") = 1 | ||
Line 99: | Line 99: | ||
If ADOConn.Errors.Count > 0 Then | If ADOConn.Errors.Count > 0 Then | ||
For Each i In ADOConn.Errors | For Each i In ADOConn.Errors | ||
MsgBox "Error: " & | MsgBox "Error: " & i.Description | ||
Next | Next | ||
End If | End If | ||
MsgBox "Recipients :" & | MsgBox "Recipients :" & RS2.RecordCount | ||
Set adoCom2 = Nothing | Set adoCom2 = Nothing | ||
Line 111: | Line 111: | ||
The following is an example of a script that fails: | The following is an example of a script that fails: | ||
<pre class="codesample">srvname = "myserver" | <pre class="codesample">srvname = "myserver" | ||
userDN = "LDAP://" & | userDN = "LDAP://" & srvname | ||
Set ADOConn = CreateObject("ADODB.Connection") | Set ADOConn = CreateObject("ADODB.Connection") | ||
Line 127: | Line 127: | ||
If ADOConn.Errors.Count > 0 Then | If ADOConn.Errors.Count > 0 Then | ||
For Each i In ADOConn.Errors | For Each i In ADOConn.Errors | ||
MsgBox "Error: " & | MsgBox "Error: " & i.Description | ||
Next | Next | ||
End If | End If | ||
If RS2.EOF And RS2.BOF Then | If RS2.EOF And RS2.BOF Then | ||
MsgBox "EOF & | MsgBox "EOF & BOF true" | ||
End If | End If | ||
MsgBox "Recipients :" & | MsgBox "Recipients :" & RS2.RecordCount | ||
Set adoCom2 = Nothing | Set adoCom2 = Nothing |
Revision as of 12:35, 21 July 2020
Article ID: 246567
Article Last Modified on 10/26/2006
APPLIES TO
- Microsoft Exchange Server 5.5 Service Pack 3
This article was previously published under Q246567
SYMPTOMS
Lightweight Directory Access Protocol (LDAP) searches on either the Home-MDB attribute or the Home-MTA attribute are not returned properly in sites containing multiple Exchange Server 5.5 computers. With a paged LDAP search, you can properly return objects when the number of objects is below the LDAP server limit (default is 100). If the number of objects exceeds the limit, the search returns nothing.
CAUSE
In the internals of the directory, when a paged search is performed, the directory first attempts to see if the total number of objects is more than the page size. If not, it just returns the elements and says it is done. If the number is bigger, the directory performs the search again. Unfortunately, the directory attempts to reconvert the filter back to the internal form. For text and numeric based attributes, this is fine as the directory just does no-ops for each value. However, for distinguished names (DNs) and organizational names, the directory attempts to convert the already converted data. The directory corrupts the filter, the second search does not find any objects, and you get zero results.
RESOLUTION
To resolve this problem, obtain the latest service pack for Exchange Server 5.5. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
191014 XGEN: How to Obtain the latest Exchange Server 5.5 Service Pack
STATUS
Microsoft has confirmed that this is a problem in Microsoft Exchange Server version 5.5 SP3. This problem was first corrected in Exchange Server 5.5 Service Pack 4.
MORE INFORMATION
The following is a script that works properly when you do a single server query:
srvname = "myserver" userDN = "LDAP://" & srvname Set ADOConn = CreateObject("ADODB.Connection") Set adoCom2 = CreateObject("ADODB.Command") ADOConn.Provider = "ADSDSOObject" ADOConn.Open "Active Directory Provider" Set adoCom2.ActiveConnection = ADOConn adoCom2.CommandText = "<" & userDN & ">;(home-mdb=*);cn;subtree" adoCom2.Properties("Page Size") = 16 adoCom2.Properties("Timeout") = 1 Set RS2 = adoCom2.Execute If ADOConn.Errors.Count > 0 Then For Each i In ADOConn.Errors MsgBox "Error: " & i.Description Next End If MsgBox "Recipients :" & RS2.RecordCount Set adoCom2 = Nothing Set RS2 = Nothing Set rs = Nothing
The following is an example of a script that fails:
srvname = "myserver" userDN = "LDAP://" & srvname Set ADOConn = CreateObject("ADODB.Connection") Set adoCom2 = CreateObject("ADODB.Command") ADOConn.Provider = "ADSDSOObject" ADOConn.Open "Active Directory Provider" Set adoCom2.ActiveConnection = ADOConn adoCom2.CommandText = "<LDAP://MYSERVER>;(home-mdb='cn=Microsoft Private MDB,cn=MYMACHINE,cn=Servers,cn=Configuration,ou=MYDOMAIN,o=Microsoft');cn,adspath;subtree" adoCom2.Properties("Page Size") = 16 adoCom2.Properties("Timeout") = 1 Set RS2 = adoCom2.Execute If ADOConn.Errors.Count > 0 Then For Each i In ADOConn.Errors MsgBox "Error: " & i.Description Next End If If RS2.EOF And RS2.BOF Then MsgBox "EOF & BOF true" End If MsgBox "Recipients :" & RS2.RecordCount Set adoCom2 = Nothing Set RS2 = Nothing Set rs = Nothing
Keywords: kbbug kbexchange550presp4fix kbexchange550sp4fix kbfix kbqfe KB246567