Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using a FullTextSqlQuery to grab some data from a SharePoint instance. Initially I had a fairly simple where clause in which I filtered the results by the content type and everything worked fine.

I then tried to add some date filtering which added a condition like:

 AND mypublishstartdate <= '11/9/2011'

to the end. Unfortunately I am now getting the error:

Error HRESULT E_FAIL has been returned from a call to a COM component.

Exception Details: System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: Error HRESULT E_FAIL has been returned from a call to a COM component.

Does anyone know what I am doing wrong here?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Do you have a managed property called mypublishstartdate which has a crawlable property mapped to it?

share|improve this answer
    
Yes I have that –  Abe Miessler Nov 9 '11 at 20:19
    
Try formatted your date in Year to Day format, then. YYYY-MM-DD. –  James Love Nov 9 '11 at 20:22
    
No more errors! Not getting any records now, but I can figure that out. Thanks! Any idea why that fixes it? –  Abe Miessler Nov 9 '11 at 20:27
    
It's the format datetimes are stored in the database, Year to second, YYYYMMDDTHHmmssZ (also known as ISO8601). –  James Love Nov 9 '11 at 20:35
    
Awesome, you're the man James! –  Abe Miessler Nov 9 '11 at 20:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.