I have a problem with the following SELECT statement:
Code Block<?xml version="1.0" ?>- <D:searchrequest xmlns:D="DAV:"><D:sql>SELECT "DAV:displayname", "DAV:id", "DAV:href", "DAV:creationdate" FROM "https://192.168.200.99/Exchange/jan.kowalski/tasks" where CONTAINS ("DAV:displayname", ' "test" ')</D:sql>
Response error is:
The remote server returned an error: (422) Unprocessable Entity.
The problem is the CONTAINS predicate in sql statement. Every statement with this predicate returns this error. I tried also CONTAINs without field name.
Does anybody know what can be a reason?
I connect to MS Exchange 2003.
Thanks in advance
Unfortunately what your trying to do wont work Contains will only work firstly if you have Full Text indexing enabled and it can only be used to search those properties that get indexed there a full a list of the properties that can be searched on http://msdn2.microsoft.com/en-us/library/aa494173.aspx.
If you wanted to search for ever email that had test in the subject then you could use Like egCode Block
I have a similar problem with the following query:Code SnippetSELECT “DAV:displayname” FROM “Inbox” WHERE CONTAINS(*, '"buy"')
This request works fine on Exchange 2003, but it doesn't work on Exchange 2007.
Response error is "(422) Unprocessable Entity".
Full-text indexing is enabled. MSDN says "Use an asterisk (*) to include all properties marked for full-text indexing".
Requests without CONTAINS predicate work fine on Exchange 2007. What can be wrong with this request?
The Search service was rewritten in 2007 to use MSSearch v3 as WebDAV and Exoledb have been demphasised on 2007 I have a feeling that they these API's where not ported for the new search service. Either that or its a bug i can't make simple searches using WebDAV or Exoledb work.