First things first, authorize the computer from the Store menu in iTunes. When you connect the iPhone you should be asked if you want to Transfer Purhases or Erase and Sync. Transfer purchases to pull over apps and music/movies from the iTunes Store. After transferring purchases, do the Erase and Sync. A lot of people do not realize that Erase and Sync does not affect your contacts/calendars on an iOS device. It only applies to music/videos. This means that any music or videos synced to the iOS device that were not purchased through iTunes will be removed, but the purchased stuff will transfer back over. After re-syncing your iTunes content, you can enable contact/calendar syncing via the Info tab in iTunes that is visible when you have the iOS device name selected on the source bar to the left. Enabling contact/calendar syncing in iTunes will not clear or replace data on the iPhone, it will copy the contacts and calendar events into the corresponding application/program on your computer.