Duplication

Jan 4, 2010 at 2:07 PM

I will ask why when I lunh again the program in my gmail calendar the appointment are duplicated.

And the time of event are not the same?

In additional the 1st time the program put on the creation date all events in a day.

I have delete all record and remported but the result are the same.

My regards

Pietro

Coordinator
Jan 5, 2010 at 2:55 PM

Could you please provide me a sample .ics file that shows that behavior?

Thanks,

Alejandro

Jan 5, 2010 at 4:16 PM

Dear Alejandro thanks for your replay.

I send you an .ics test file, and screen shoot where I highlighted the problem.

My best regards

Pietro


Da: amezcua [mailto:notifications@codeplex.com]
Inviato: martedì 5 gennaio 2010 16:56
A: pceribelli@gmail.com
Oggetto: Re: Duplication [gcalicsimporter:79691]

From: amezcua

Could you please provide me a sample .ics file that shows that behavior?

Thanks,

Alejandro

Read the full discussion online.

To add a post to this discussion, reply to this email (gcalicsimporter@discussions.codeplex.com)

To start a new discussion for this project, email gcalicsimporter@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Jan 7, 2010 at 1:49 PM

Hi there, quick reply. If you see my other post, I downloaded the source code and added the following code before the line which is (foreach (var icsEvent in icsFile.Events)). This deletes all the previous events in the calendar and then just appends the new ones from the ics file. This is working fine for me. Cheers, K

// Create the query object:
            EventQuery query = new EventQuery();
            query.Uri = new Uri(GCalStrings.CalendarUri);
            EventFeed evFeed = service.Query(query);
            // Tell the service to delete the current events, as we will now be updating
            foreach (EventEntry evente in evFeed.Entries)
            {
                //Console.WriteLine("Deleting event: " + evente.Title + "\n");
                try
                {
                    evente.Delete();
                }
                catch (GDataRequestException)
                {
                    Console.WriteLine("Unable to delete event.\n");
                }
            }
    

Jan 7, 2010 at 4:42 PM

Dear Cheers, thanks for your replay but can you give me how can insert your instruction into a file that I have downloaded that contain only (into a zip file):

gcalicsimporter.exe

gcalicsimporter.exe.config (where there is the possibility to config the account)

Google.GData.AccessControl.dll

Google.GData.Calendar.dll

Google.GData.Client.dll

Google.GData.Extensions.dll

Jan 14, 2010 at 6:41 AM

Dear Alejandro no news good news or there is a problem?


Da: amezcua [mailto:notifications@codeplex.com]
Inviato: martedì 5 gennaio 2010 16:56
Oggetto: Re: Duplication [gcalicsimporter:79691]

From: amezcua

Could you please provide me a sample .ics file that shows that behavior?

Thanks,

Jan 26, 2010 at 11:12 AM

Hi there, sorry I haven't replied sooner. You need to download the source code and edit this in c#. You can use visual c# express which is a free download. An upgrade to allow this as a setting from the config file would be useful. I woudl do this but I can't get my software to work as the default program for the ics file type so it's not much use! hope this is helpful, Ken

Jan 26, 2010 at 11:51 AM

I meant to say, if you want the file, I can send you it, just drop me a line and I'll email you it as an attachment, then you can just drop it into your folder! cheers, Ken

Jan 27, 2010 at 8:24 PM

Hi kboyd,

I just checked your code: It doesn't check for duplicates but rather deletes ALL calendar events, right?
For user (like me) that use gcaolicsimporter for adding single events (like a train trip) into my google
calendar the code erases all entries not only the duplicates.

Jan 28, 2010 at 2:45 PM

buzz_l, yes you're quite right. I'm no expert in C# or google calendar and I was in a bit of a hurry so I simply managed to get it to delete everything. It would be much better if you could delete individual events if they were duplicates - have you done this? Cheers, Ken

Jan 29, 2010 at 7:14 AM

Hi kboyd, no I haven't done that. I just wanted to warn unexperienced users to included your code, run it and loose all data :)
Anyway checking for duplicates is certainly very useful and maybe worth spending some time. Axel

Mar 16, 2011 at 7:39 AM

Hi kboyd, 

Tried your code above which works well for single day, how do modify so that it can clear events between two different dates. For example using something like this vb statement:

Event.[StartDateTime] BETWEEN #" & tmpDate & " 11:59:59 PM# AND #" & tmpDate2 & "#"

We are not C# fluent and are having trouble figuring out the Google API's to delete events.

Thanks Chris