Hi


I'm trying to update an EventEntry from my calendar, but i always get
an Exception, that the event is ReadOnly.

How can i make this event not readonly ?


I got this code:

To Update


    Public Sub UpdateCalendarEvent(ByVal updatedEvent As EventEntry)

        Connect()

        _MyService.Update(updatedEvent)



    End Sub


To insert an Event:

  Public Sub AddEvent(ByVal calEvent As EventEntry, ByVal calEntry As
CalendarEntry)
        Dim postUri As Uri
        Dim addRequest As AtomEntry

        Try
            'Login on the Google Service
            Connect()

            postUri = New Uri(calEntry.Id.AbsoluteUri.Replace("default/
allcalendars/full/", "") _
                             + "/private/full")

            If calEvent.Title.Text = String.Empty Then
                Throw New NullReferenceException("Event title is
empty")
            End If


            addRequest = CalService.Insert(postUri, calEvent)

        Catch nex As NullReferenceException
            MessageBox.Show(nex.ToString)
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
        End Try


    End Sub

To create The eventEntry:

Private Sub CreateEvent()
        Dim calEntry As CalendarEntry
        Dim eventEntry As New EventEntry
        Dim location As New Where
        Dim eventTime As New [When]

        calEntry = _listCals.Item(lstCalendars.SelectedIndex)

        'Set Event Title
        eventEntry.Title.Text = txtEventTitle.Text

        If eventEntry.Title.Text = String.Empty Then
            Throw New NullReferenceException
        End If

        'Set Event Info
        eventEntry.Content.Content = txtEventInfo.Text

        'Set Location
        location.ValueString = txtLocation.Text
        eventEntry.Locations.Add(location)

        eventTime.StartTime = dtpBegin.Value
        eventTime.EndTime = dtpEnd.Value

        If dtpEnd.Value < dtpBegin.Value Then
            Throw New FormatException
        End If


        eventEntry.Times.Add(eventTime)

        _XCal.AddEvent(eventEntry, calEntry)

Please help :)


--~--~---------~--~----~------------~-------~--~----~
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