ActiveSync and removing duplicate contacts

mjcoon

Well-Known Member
Licensed User
Somehow by using ActiveSync (and syncing with Google too) I have ended up with a large proportion of my contacts entries as almost exact duplicates (ca. 900 in total). The difference with those not exact seems to be the Categories field which is populated in one of the pair and not in the other.

No problem, I thought, I can use outlook.dll to massage the entries, detect duplicates from LastName/FirstName and remove (the) one with no Category field. I wrote the program and it works OK on the device. (There is no Outlook.dll functionality on the desktop.)

But I seem to have the choice of getting triplicate entries if I just let the device ActiveSync after the program runs, or deleting the contacts on the desktop in which case all the device contacts get removed by ActiveSync!

Can anyone explain how ActiveSync resolves contacts entries on device and desktop and how this interacts with outlook.dll changes on the device. Or just how to solve my duplicates?

Mike.
 

mjcoon

Well-Known Member
Licensed User
"webpage" property in Outlook.dll faulty

Thanks Erel, I notice that citation mentions setting up a new partnership via Activesync and I had wondered if that might make a difference. I'll give it a go...

Mike.

I'm not sure I ever really cracked my problem, which has cropped up again.

As part of a potential solution I tried writing *all* contact properties to an SQL d/b. That fails when retrieving the webpage property; all others work.

Is is possible to correct this outlook.dll bug?

(I'll put it in the bugs sub-forum if necessary.)

Mike.
 

mjcoon

Well-Known Member
Licensed User
Which error do you get?

Hi Erel, it's:

NullReferenceException - Continue?

Running under the device IDE shows that it is the line:
B4X:
Case "webpage"  :  value = Contact.webpage

and the error message changes to: TargetInvocationException - Continue?

The Select statement has Case-s for all the other properties which work fine, and commenting out the webpage Case allows the program to run OK but of course misses out this property.

Mike.
 

mjcoon

Well-Known Member
Licensed User
Seems like it fails when there is no webpage value set. What you can do is to create a small sub that tries to read this value and ignores it if an error is raised (with ErrorLabel).

OK, I can do that. Odd that other properties don't act that way; there must be many with no content in my contacts...

Mike.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…