Hi i am trying to read google Calendar into Mysql Database using VB
using the following code i found it works but only reads 25 records and seems to ignore date range, also we have multiple people on 1 calendar so how do we select which calendar we are looking at.
Imports Google.GData.Calendar
Imports Google.GData.Extensions
Imports Google.GData.Client
Dim srvce As New Google.GData.Calendar.CalendarService("GCal")
Dim query As New FeedQuery
Dim entr As EventEntry
google_ac = fastlookup("google_account", "engine", "engid = " & gl_engid)
google_pass = fastlookup("google_password", "engine", "engid = " & gl_engid)
If nullstr(google_ac) = "" Then
google_live = 0
Else
google_live = 1
query.Uri = New Uri("https://www.google.com/calendar/feeds/default/private/full")
query.ExtraParameters = "orderby=starttime&sortorder=ascending"
srvce.setUserCredentials(google_ac, google_pass)
Dim calfeed As AtomFeed
calfeed = srvce.Query(query)
MsgBox(calfeed.Entries.Count)
For Each entr In calfeed.Entries
eventid = entr.EventId.ToString
ans = fastlookup("appointmentid", "workorder_appointments", "google_eventid = '" & eventid & "'")
If nz(ans) = 0 Then
strsql = "insert into workorder_appointments (engid,appointment_title, " & _
" appointment_desc,Appointment_type,appointment_start,appointment_end,google_eventid ) values (" & _
gl_engid & ",'" & _
entr.Title.Text & "','" & _
entr.Content.Content.ToString & "','" & _
"Day Appointment" & "','" & _
Format(entr.Times.Item(0).StartTime, "yyyy-M-d H:mm:ss") & "','" & _
Format(entr.Times.Item(0).EndTime, "yyyy-M-d H:mm:ss") & "','" & _
eventid & "')"
mysql_query_nr(strsql)
End If
Next
End If