I see.
Don't you have a cage for the hamster?
I use to have a hamster and they are great little critters. He had a cage and a ball that he would run around in. Do you have one of those balls? You could just keep the hamster either in his cage, in the ball, or with you while the dog was out.
Just make sure the dog isn't in the same room when the hamster is out of it's ball or cage if your really worried about it.
What kind of dog are you thinking about getting?