Jenyphur wrote:

>
> Can you post your code so I can see if we are doing things the same
> way? Thanks.
>

My code is very standard and as follows. One important point is that I
found it possible to make use of the ".NextChunk()" method; doing so
always returned a result that was incompatible with the query.Uri
property, so resulting in a run-time abort. In the end I just read all
the events in one go.

John

Precis of code:

 string calendarURI = "myUrl";
 string userName = "[EMAIL PROTECTED]";
 string passWord = "mypassword";

            EventQuery query = new EventQuery();
            CalendarService service = new
CalendarService(ApplicationName);

            if (userName != null)
            {
                service.setUserCredentials(userName, passWord);
            }

            query.Uri = new Uri(calendarURI);
                        query.NumberToRetrieve=999;

            EventFeed calFeed = service.Query(query);

            DeleteEvents (calFeed, query, service);

private void DeleteEvents (EventFeed calFeed,
        EventQuery query,
        CalendarService service){
        int i=0;
            while (calFeed != null && calFeed.Entries.Count > 0)
            {
                foreach (EventEntry entry in calFeed.Entries){
          i++;
          Response.Write (i.ToString() + " Deleting: " + entry.Title.Text +
"<br />");
          entry.Delete();
                }
         calFeed = null;                
            }
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi
-~----------~----~----~----~------~----~------~--~---

Reply via email to