"is there problem in the codes below ?"

Yes. It's not doing the same thing that you are describing in words.

You say you are updating an event, but the code creates one new event
(myEntry) and sets the times on it, the retrieves a separate event
(retrievedEntry) and doesn't do anything to it except update it.

Try updating the retrievedEntry with code that is similar to the code
that you used to set the time on myEntry. Perhaps that will work?

Ray


On Thu, Dec 4, 2008 at 11:10 AM, Lindberg.he <[EMAIL PROTECTED]> wrote:
>
> Thank you so much,and what about this one,if I want to update the
> event,is there problem in the codes below ?
>
> URL postUrl =new URL("http://www.google.com/calendar/feeds/
> [EMAIL PROTECTED]/private/full");
> CalendarEventEntry myEntry = new CalendarEventEntry();
> DateTime startTime = DateTime.parseDateTime("2008-12-17T15:00:00");
> DateTime endTime = DateTime.parseDateTime("2008-12-17T17:00:00");
> When eventTimes = new When();
> eventTimes.setStartTime(startTime);
> eventTimes.setEndTime(endTime);
> myEntry.addTime(eventTimes);
> CalendarEventEntry retrievedEntry = new CalendarEventEntry();
> retrievedEntry.setTitle(new PlainTextConstruct("Important meeting"));
> URL editUrl = new URL(retrievedEntry.getEditLink().getHref());
> CalendarEventEntry updatedEntry = (CalendarEventEntry)myService.update
> (editUrl, myEntry);
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to