Same issue here. First off let me rant. Why create a device with a charging port using USB (universal serial bus), and then insist on using manufacturers provided USB cable... let me stress UNIVERSAL, meaning any USB cable should work!
Rant aside,
My resolution: Remove battery and reboot device, reconnect. This often fails and I subsequently have to leave connected via USB to computer, and reboot multiple times. I often get distracted after a reboot and eventually (5 mins or so) it will connect. It's as if it's just extremely slow to connect, and if it tries too fast, it fails and reconnects/disconnects. Just keep rebooting while connected and wait 5 mins before next reboot, eventually it will connect properly and charge/connect.
best of luck and remember, patience is key!
edit: furthermore, the manufacturer often points to falty hardware whenever possible, if its under warranty people don't want to be without device, and if its not under warranty, nobody seeks further help and often buys a new phone eventually. Through troubleshooting I've deduced this to be software related, but finding the coding is never fun and arduous often taking hours upon hours and being very costly and painstaking to rectify. Don't expect this issue to ever be properly solved, much to my dismay as the USB connection issues in Win 7 transfer speeds... but that's a rant for another day. 8-/