I never said it was easy.

Question: I have problems having casual sex without becoming emotionally attached.
Answer: Stop having casual sex until you find someone with whom you have an emotional attachment.

The answer is incredibly easy. Actually putting it into practice is the hard part. A lot of people on here are in various stages of trying to find their "perfect" partner.

But.... if having casual sex is causing you problems... stop doing it. That part is perfectly easy.

You do know the definition of insanity?