If you have a pet that still has accidents in the house, limit it's water by putting ice cubes in their water bowl after 6:00pm, so they don't feel they have to go to the bathroom every second. It works with my dog.
Source: TV show, The Dog or Me
By Meghan O. from Pittsburgh, PA
This page contains the following solutions.
Has anyone considered taking the dog outside in the backyard or on a lead every two or three hours in the street/park? Also make 4 pm their last meal of the day.
Put a leash on the dog and it goes everywhere you do in the house. Be sure to feed it once daily only and monitor when it drinks. Be sure to get it outside before an hour has passed. Because the dog is constantly with you it may or may not try to use the carpet, but a sharp yank on the leash will give the dog a clear message that it's not supposed to do that.
If you have a Yorkshire Terrier puppy, you will need to get it house broken as soon as possible. This is a page about house training a Yorkshire Terrier.
This is a page about training a dog to not poop inside. Some dogs are more difficult to house train than others, but with consistency you should be able to teach your dog to not poop inside.