hi clutter - hope you're still reading before you go to the wedding....
This is what has worked for me (apologies for long post, but borne out of much experience of drinking and not drinking).
Firstly, being really clear in my own mind what I want to achieve. Saying "I hope I don't drink" or "I'm going to try not to drink" never worked for me - partly because hope and try are pretty weak verbs (passive rather than active - like hoping for nice weather, but not being able to influence it), but also because mostly our brains don't recognise a negative (like don't). So our brains can't distinguish between "I hope I don't drink" and "I hope I drink"
So instead, use an active verb, and frame things in a positive term e.g. "I plan to remain sober". Then add something extra, like: "I plan to remain sober, and to have a great day".
Then really really really* plan for your sobriety. In the same way as you might have planned for a really stupendous night out. So where you might have stuffed your handbag with vodka - instead stuff it with sweets or peanuts, or bottles of blackcurrent and beetroot fruit juice (or whatever floats your boat).
Know, absolutely and clearly what you are going to ask for to drink, and also how you are going to ask for it. So when someone offers you a tray laden with champagne or orange juice, know and practice phrases such as "oh I'm really thirsty, I'd love an orange juice". Or at the bar, say "I'm looking for something thirst-quenching and cold, so I'll have a lime and soda (lots of ice, and not too much lime, thanks)"
Next time round, have another plan e.g. "well you know I'm feeling a little warm, so I think I'll have another lime and soda" or "actually I've got a bit of a headache, so I think I'll have some orange juice", or "actually I'm a bit hungry, so I'll have some apple juice, and leave the wine." The best thing about this strategy is three-fold: 1) you will have reinforced your mental plan to remain sober; 2) you will have got over the difficult pre-dinner phase of a wedding; 3) you will be hydrated and your stomach will feel full, avoiding false signals of wanting something to eat/drink.
Then a big bit of advice: HALT (Hungry, Angry, Lonely, or Tired) - these are the biggest triggers of drinking. So avoid them. Weddings are notorious for leaving you waiting ages for a meal. So don't rely on canapes and champagne to keep you going. Take in your handbag, a banana, or a kitkat or a bag of peanuts or some nuts and raisins. Anger (or other emotions) - feel like crying? then cry; feel angry then go and stomp around outside; feel scared? then find a comforting friend - just for today deal with various emotions as they arise. Try posting here - any rubbish will do.
Lonely? Which people can feel most in weddings surround by 'loved-up' couples. Find other lonely people (old relatives will always chat to you - and who knows , you might make their day).
Tired? Have a coffee, put your feet up, and know that you'll get a good nights sleep.
And finally, have with you a list of the horrible-ness of getting drunk, the brilliance of being sober; the links to this thread, the phone number of the local AA group.
Remember it is only 24 hours. The next day you can change your mind and get as pissed as you like, but for that 24 hours, why don't you try an experiment, see how well you can do, and feel good about whatever happens.