Never think of weightloss surgery as a cure for all your problems. It's not magic, and it does have a small but significant failure rate. Worse is the problem of self-sabotage, because sometimes deep down you're obese for an emotional reason. Try to resolve these issues before submitting to the surgery.
Even when your weightloss surgery is a success, which it often is, you'll still need to exercise some willpower so that you don't accidentally sabotage yourself. Remember, your stomach can now hold only a little food, so your meals should be very small -- and avoid eating all the time, too.