Working in ASP.NET I am running the following code to search for and delete contacts:
Dim rs As New RequestSettings(varDomain, varName, varPW) System.Net.ServicePointManager.Expect100Continue = False rs.AutoPaging = True Dim cr As New ContactsRequest(rs) Dim f As Feed(Of Contact) = cr.GetContacts() Dim varContactCount As Integer = 0 For Each varContact As Contact In f.Entries If Strings.InStr(varContact.Content, "TEXT TO IDENTIFY CONTACT") > 0 Then cr.Delete(varContact) Response.Write(varContact.Name.FullName & "<BR>") End If Next When I run the code I know there are 50 contacts that have the text I'm looking for in the Content, yet I may see only 46 or 48 of them getting written to the screen + being deleted. If I run the code again (or duplicate the code to run twice), it will find and delete the remaining records. I tried adding 1 second Sleeps after each Delete but that didn't help. Can someone help me understand what is happening so that I might re-code it? I don't really want to step through a user's contacts twice just to make sure it did what I wanted. Thanks -- You received this message because you are subscribed to the Google Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html
