Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Ado property search

  Asked By: Juan    Date: Mar 05    Category: Sharepoint    Views: 1068

try doing this but doesn't seem to be doing anything:
i want to search under the property "effective date" within the last
2 years. it worked when i had the "dav:lastmofifieddate" in instead
of the "urn:schemas-microsoft-com:office:office#Effective Date"

"SELECT ""DAV:displayname"" AS DisplayName, ""DAV:href"" AS
HRef, ""urn:schemas-microsoft-com:office:office#Title"" AS Title, "

" ""urn:schemas.microsoft.com:fulltextqueryinfo:description""
AS Description, ""urn:schemas.microsoft.com:fulltextqueryinfo:rank""
AS RANK, " & _
" CAST(""DAV:getlastmodified"" AS DATE) AS
LastModified " & _
" from scope('Deep traversal
of ""/phoenix/documents""') where ""urn:schemas-microsoft-
com:office:office#Effective Date"" <= DATEADD (YEAR, -2, GETGMTDATE
()) "



1 Answer Found

Answer #1    Answered By: Dominic Davis     Answered On: Mar 05

I would advice try same query without Effective Date first. I have
notoced problem with DAV:parentname. It should be in "",so
like ""DAV:parentname"". May be it was just type mistake, and in real
query it is ok... Another thing is that I have never heard about
property called ""urn:schemas.microsoft.com:office:office#Effective
Date"", so I am not sure if it really exist. However it is possible
that you got problem with <= DATEADD(YEAR, -2, GETGMTDATE()) part,
so I would advice you first of all
try ""urn:schemas.microsoft.com:office:office#Effective Date"" in
SELECT part and with empty where. it can help you to see if your
syntax is correct and if it is what record you have and if they match
your where criteria. If I were you, I would also try query
without ""urn:schemas.microsoft.com:office:office#Effective Date"" at
all, just to be sure that other things are correct. As I already
said, I am not sure
that ""urn:schemas.microsoft.com:office:office#Effective Date""
exist, I have never used it. the only properties I know you can find
in the following links

this one is more for search:
msdn.microsoft.com/.../en-" target="_blank" rel="nofollow">msdn.microsoft.com/.../en-

and this one is more for document management system of SP:
msdn.microsoft.com/.../en-" target="_blank" rel="nofollow">msdn.microsoft.com/.../en-

In case you are creating intranet of internet search,
using ""DAV:getlastmodified"" is a good possibility, so you can use
it instead of ""urn:schemas.microsoft.com:office:office#Effective
Date"". It is quite possible that it is your only possibility:) And
if you are searching within document management system of SP, I am
not really acquainted with document management system of SP, but I am
sure the fields in second link will help you.

So you have a lot of things totry now:) Success with that!!! please
let me know if that helped you.

Didn't find what you were looking for? Find more on Ado property search Or get search suggestion and latest updates.