Atul Saxena
2007-10-26 08:55:00 UTC
I am doing following code:
Dim sQuery As String
Dim status As Integer
Dim oXMLHttp1 As MSXML2.XMLHTTP30 = New MSXML2.XMLHTTP30
Try
oXMLHttp1.open("SEARCH", stURI, False, Me.UserNameAlias,
Me.Password)
sQuery = "<?xml version='1.0' encoding= 'utf-8'?>" & _
"<a:searchrequest xmlns:a='DAV:'
xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:""> " & _
"<a:sql>SELECT ""DAV:id"", ""DAV:getlastmodified"" " & _
"FROM Scope('SHALLOW TRAVERSAL OF """ & stURI & """')"
& _
"WHERE ""DAV:href"" = """ & strHref & """ " & _
"</a:sql>" & _
"</a:searchrequest>"
oXMLHttp1.setRequestHeader("Content-Type", "text/xml")
oXMLHttp1.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp1.send(sQuery)
status = CheckStatus(oXMLHttp1.status)
If status = En.enStatus.Multi_Status Then
MsgBox(oXMLHttp1.responseText)
End If
Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
sQuery = Nothing
status = Nothing
End Try
The value of sQuery contains:
<?xml version="1.0" encoding="utf-8" ?>
- <a:searchrequest xmlns:a="DAV:" xmlns:m="urn:schemas:mailheader:"
xmlns:cal="urn:schemas:calendar:">
<a:sql>SELECT "DAV:id", "DAV:getlastmodified" FROM Scope('SHALLOW
TRAVERSAL OF
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/"')WHERE
"DAV:href" =
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/No%20Appointment.EML"</a:sql>
</a:searchrequest>
but it is giving me "Bad Request" error where as appointment is present with
href
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/No%20Appointment.EML".
Although If I remove where condition in Select clause then it shows all the
appointment including href
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/No%20Appointment.EML".
Please suggest where I am doing wrong.
Thanks & regards,
Atul Saxena
Dim sQuery As String
Dim status As Integer
Dim oXMLHttp1 As MSXML2.XMLHTTP30 = New MSXML2.XMLHTTP30
Try
oXMLHttp1.open("SEARCH", stURI, False, Me.UserNameAlias,
Me.Password)
sQuery = "<?xml version='1.0' encoding= 'utf-8'?>" & _
"<a:searchrequest xmlns:a='DAV:'
xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:""> " & _
"<a:sql>SELECT ""DAV:id"", ""DAV:getlastmodified"" " & _
"FROM Scope('SHALLOW TRAVERSAL OF """ & stURI & """')"
& _
"WHERE ""DAV:href"" = """ & strHref & """ " & _
"</a:sql>" & _
"</a:searchrequest>"
oXMLHttp1.setRequestHeader("Content-Type", "text/xml")
oXMLHttp1.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp1.send(sQuery)
status = CheckStatus(oXMLHttp1.status)
If status = En.enStatus.Multi_Status Then
MsgBox(oXMLHttp1.responseText)
End If
Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
sQuery = Nothing
status = Nothing
End Try
The value of sQuery contains:
<?xml version="1.0" encoding="utf-8" ?>
- <a:searchrequest xmlns:a="DAV:" xmlns:m="urn:schemas:mailheader:"
xmlns:cal="urn:schemas:calendar:">
<a:sql>SELECT "DAV:id", "DAV:getlastmodified" FROM Scope('SHALLOW
TRAVERSAL OF
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/"')WHERE
"DAV:href" =
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/No%20Appointment.EML"</a:sql>
</a:searchrequest>
but it is giving me "Bad Request" error where as appointment is present with
href
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/No%20Appointment.EML".
Although If I remove where condition in Select clause then it shows all the
appointment including href
"http://192.168.111.10/Exchange/***@ccrindia.com/Calendar/No%20Appointment.EML".
Please suggest where I am doing wrong.
Thanks & regards,
Atul Saxena