logo       

Using VB.NET with the gdata.dll: msg#00103

Subject: Using VB.NET with the gdata.dll
I wanted to try out the google API and couldn't get the code to work in
C# so I tried VB.NET and I'm getting the same issue.  Below is the code
I'm using but I get an error message on the calservice.query.  Message
is "An unhandled exception of type 'System.NullReferenceException'
occurred in system.xml.dll  Additional information: Object reference
not set to an instance of an object.".  In looking at the sample code I
think I have everything right but I'm stumped.  I'm using VS 2002 and
.NET 1.1.

Thanks,
Nathan


Dim calservice As New CalendarService("nathantest")
Dim eventqry As New EventQuery()
Dim eventfd As EventFeed
Dim eventitm As EventEntry

    calservice.setUserCredentials("nathanpettit@xxxxxxxxx", "***")

    eventqry.Uri = New
Uri("http://www.google.com/calendar/feeds/nathanpettit@xxxxxxxxx/private/full";)
    eventqry.StartDate = New Date(2006, 8, 16)
    eventqry.EndDate = New Date(2006, 8, 19)
    eventqry.FeedFormat = AlternativeFormat.Unknown
    eventqry.NumberToRetrieve = 10
    eventfd = calservice.Query(eventqry)
    For Each eventitm In eventfd.Entries
      Debug.WriteLine(eventitm.Id.AbsoluteUri & " / " &
eventitm.Title.Text)
    Next

    eventqry = Nothing
    calservice = Nothing




<Prev in Thread] Current Thread [Next in Thread>