Consistency and Patience. Never scold or punish your puppy for mistakes and accidents. The older your pup gets, the more he will be able to control his bladder and bowels. Eventually your pup will have enough control that he will be able to "hold it" for longer and longer periods of time. Let your puppy do this on his own time. When training is rushed, problems usually develop. Don't forget, most puppies are not completely house trained until they are 6 months old.
A training class is not there to train your dog. Its purpose is to teach you to train your dog so you will need to be committed to train your dog for short sessions (5 minutes) several times a day rather than just simply turn up for classes! This little bit of training everyday will be repaid with a lifetime of living with a well behaved dog. You will also learn to avoid problems before they begin as well as receive help to overcome any that you already have with your dog.