Thank you for your patience. There are a number of reasons as to why your newly adopted boy is having difficulty learning toilet training, but it is likely that he was just never trained when he was a puppy - or he could have even been caged most of his life. We also have to consider a congenital issue, or primary urinary tract disorder here as well however, as it is unlikely you know much of his history here. For this reason, first and foremost, I would recommend a trip to your Veterinarian to have your boy completely checked over. There are a number of conditions that can affect 'middle aged' dogs to cause this type of problem including urinary tract infections, bladder stones, bladder masses and even an incontinence issue. If your boy isn't neutered yet - definitely get this done as soon as you can too. A trip to the vet is definitely definitely be the first port of call, as there could well be an underlying medical issue in your boy's case.
I'm not exactly sure what you're doing to toilet train your boy, but in general you need to take him out several times per day, and this is the basis of training adult dogs and puppies on how and where to urinate appropriately. Dogs generally need to pee and poop when they get up from a sleep, after they eat, after exercise and before going to sleep. These are the main times you need to make sure you get your boy outside. You should also begin giving him a command when you take him outside such as 'toilet!' or 'be quick!'. Be sure to take him to the same spot outside each time so this starts to become cemented for him. Be patient outside with him and continue to encourage him with the command you choose. When he finally does go - be sure to give him plenty of praise and perhaps even a small food reward. You will have to be persistent and consistent with this training.
When you do catch him going inappropriately indoors, be sure to give him a short, sharp growl of 'Argggh!' rather than 'No!'. Don't reprimand him if you don't catch him in the act and NEVER rub his nose in his pee or poop. You then need to clean up after him appropriately using a non ammonia based product, followed up with a pet odor neutralizer and then a few biscuits on the spot. Dogs generally don't pee or poo where they have previously eaten, so this is quite important.
If it looks as though he is peeing indoors but isn't even aware of it, this could well be a case of incontinence which can be due to a range of health related issues. If this is the case - don't reprimand him, and do be sure to have your Vet check him over this week if possible. With time, persistence and plenty of praise, you will get there with him. As he is older - it really is important to have him checked over first and foremost.
I hope all of the above makes sense? If you have more questions or if I can help in any other way, please do not hesitate to ask! If you would like to accept my answer, please press RATE OUR CONVERSATION (I am not compensated in any other way). Bonuses are always welcome. Thanks! I hope to work with you again soon!
PS: If you have additional questions after you rate the question, you are welcome to request me for additional conversations if I am on-line or by beginning your question "Dr. E..." or "Pet-doc..." and others will leave the questions for me.