I was having this same issue and here's what I did to fix it.
When you get the error:
Look in the system tray for the eject safely icon. Mine always showed it had mounted the sdcard from some reason. Safely eject the sdcard.
On the phone where it says change connection type make sure it's HTC Sync and click the "Don't ask again" box. This is important because if yours defaults to Disk Drive, Windows will mount your sdcard and HTC Sync will continue to fail.
Press "DISCONNECT" on HTC Sync
unplug usb cable.
Right click on the HTC Sync icon in the system tray and choose "Exit."
I always wait 30 sec just in case to let a program shut down completely.
Start HTC Sync from the Start Menu.
Plug in the phone.
Now it should work.
It did it again after I added bookmarks to be synchronized and repeating this worked.
Hope that helps
(Mine is an HTC Evo 3D but it should be the same for any HTC device.)