we had a few issues with our toy fox terrier but he quickly got over them. we had a large kennel cuz he was in it all day & needs some room. he kept p'in in it but that was understandable at first cuz they are a small dog & can't hold it for 8 hrs. after a while it got stupid so we started rubbing his nose in it & then slapping his nose. he learned that wasn't something to do so he would hold it. he would be in the kennel during the day & at night when we were sleeping. as he got better we let him sleep in his bed in our room at night & then from there at a year old we now let him run the house all day & he doesn't have any issues.
at first we also had issues with him going in the house when we were right there. if he did that we would rub his nose in it, slap his nose, & throw him outside. no matter how long he was out there he didn't come in until he finished what he started inside. so we got on a schedule of taking him out every 2 hours. we would go outside with him & stand there waiting for him to go. yes it was cold as H but he learned faster. we now no longer have to go out with him cuz he knows what he is supposed to do (most of the time, sometimes he wants to play).
like stated above, "what you tolerate, you teach & training is everything." dogs learn words very quickly too. if we say naughty he knows he did something wrong because that is what we would say when we rubbed his nose in it & slapped his nose. he also knows that potty means going outside & doing just that. consistancy is also very important. just like kids, if you keep them on a schedule they will get used to it.
Good Luck!!!
edit - we also gave him treats after going outside, he got the idea & always wanted a treat so would go outside.