Microsoft Knowledge Base Email Alertz

Some items are not returned in the search results when you use CAML to create a query that uses the SPQuery class to retrieve Windows SharePoint Services 3.0 list items that contain a URL

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 935503 - Last Review: May 14, 2007 - Revision: 1.0

Some items are not returned in the search results when you use CAML to create a query that uses the SPQuery class to retrieve Windows SharePoint Services 3.0 list items that contain a URL

SYMPTOMS

Consider the following scenario. You use Collaborative Application Markup Language (CAML) to create a query. The query uses the SPQuery class to retrieve items from a list on a Microsoft Windows SharePoint Services 3.0 site. The purpose of the query is to look for items that contain a URL in a particular column and then to retrieve those items. For example, the query looks for and retrieves items that contain a URL in the Hyperlink or Picture column. In this scenario, some items are not returned in the search results when you run the query.

CAUSE

This issue occurs if one of the following conditions is true:
  • The column contains a URL to the local Windows SharePoint Services 3.0 server.
  • The column contains a server name that is listed in the alternate access mappings.
If one of these conditions is true, the URL is not stored as an absolute URL. The URL is stored as a relative URL.

WORKAROUND

To work around this issue, make the URL a relative URL. To do this, remove the server name before the URL is passed to the query.

MORE INFORMATION

For more information about the SPQuery class, see the Windows SharePoint Services 3.0 Software Development Kit (SDK). To view the Windows SharePoint Services 3.0 SDK, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/ms441339.aspx (http://msdn2.microsoft.com/en-us/library/ms441339.aspx)
Or, to download the Windows SharePoint Services 3.0 SDK, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&displaylang=en (http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&displaylang=en)

APPLIES TO
  • Microsoft Office SharePoint Server 2007
  • Microsoft Windows SharePoint Services 3.0
Keywords: 
kbprogramming kbtshoot kbprb kbexpertiseinter KB935503
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate