
Signature
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp
Below is the code snippet having the query to retrieve the appointment list
for a given day. Query below returns all the appointment scheduled for the
day except that between 12:00 AM - 6:00 AM
string CalendarURL = "http://" + ServerName + "/Exchange/" + Mailbox +
"/Calendar";
strSql = " SELECT \"DAV:href\",\"urn:schemas:calendar:location\",
\"urn:schemas:httpmail:subject\", " + \"urn:schemas:calendar:dtstart\",
\"urn:schemas:calendar:dtend\", " +
"\"urn:schemas:calendar:busystatus\",
\"urn:schemas:calendar:instancetype\", " +
"\"urn:schemas:calendar:uid\" " +
"FROM scope('shallow traversal of \"" + CalendarURL + "\"') " +
"WHERE NOT \"urn:schemas:calendar:instancetype\" = 1 " +
"AND \"DAV:contentclass\" = 'urn:content-classes:appointment' " +
"AND \"urn:schemas:calendar:dtstart\" > '" + string.Format("{0:yyyy/MM/dd}",
dDate) + " 00:00:00' " +
"AND \"urn:schemas:calendar:dtend\" < '" + string.Format("{0:yyyy/MM/dd}",
dDate.AddDays(1)) + " 00:00:00' " +
"ORDER BY \"urn:schemas:calendar:dtstart\" ASC";
oRs.ActiveConnection = oRec.get_ActiveConnection();
oRs.Open(strSql,
oRec.get_ActiveConnection(), ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockOptimistic, 1);
Thanks,
Yogi
> What does your code look like?
>
[quoted text clipped - 8 lines]
> > Thanks
> > Yogi