Discussion:
webdav search textdescription
(too old to reply)
cptkirkh
2008-06-06 15:49:16 UTC
Permalink
I want to run a query using webdav to look for NDRs where the email
address is invalid. I want to search the textdescription field before
i pull the email. Here is my code. it won't let me use like but it
will let me use the = sign. Waht am I doing wrong. Thanks in
advance.
Dim searchfield = "5.1."
"<D:sql>SELECT " & _

"""urn:schemas:httpmail:textdescription"",""urn:schemas:httpmail:subject""
" & _
" FROM scope('shallow traversal of """ & strRootURI &
"""')" & _
"WHERE ""DAV:ishidden"" = false AND ""DAV:isfolder"" =
false " & _
" AND ""urn:schemas:httpmail:textdescription"" LIKE '"
& searchfield & "'" & _
"</D:sql></D:searchrequest>"
Henning Krause [MVP - Exchange]
2008-06-06 17:23:23 UTC
Permalink
Hello,

the LIKE operator requires at least one wildcard operator. Try setting your
searchfiel to "%5.1.%"

Kind regards,
Henning Krause
Post by cptkirkh
I want to run a query using webdav to look for NDRs where the email
address is invalid. I want to search the textdescription field before
i pull the email. Here is my code. it won't let me use like but it
will let me use the = sign. Waht am I doing wrong. Thanks in
advance.
Dim searchfield = "5.1."
"<D:sql>SELECT " & _
"""urn:schemas:httpmail:textdescription"",""urn:schemas:httpmail:subject""
" & _
" FROM scope('shallow traversal of """ & strRootURI &
"""')" & _
"WHERE ""DAV:ishidden"" = false AND ""DAV:isfolder"" =
false " & _
" AND ""urn:schemas:httpmail:textdescription"" LIKE '"
& searchfield & "'" & _
"</D:sql></D:searchrequest>"
Loading...