I am sorry. I called your dog "he"....and he's a "she"!
If he is constantly vomiting, then the best thing you can do, in my opinion, is to get him to the vet immediately, tell them the problem, and get the vet to give him anti-emetic drugs an fluids by I.V.
Already, your dog will be suffering dehydration, and that situation can be dangerous.
He may need to be hospitalised while the drugs and fluids take effect.
Hopefully that will stabilise him quickly, so hat he will be able to eat some soft food, and be able to take his medicines.
What is the condition he is being treated for?
If it is something like Pancreatitis, then it is not usually possible, or even advisable, for them to eat during a crisis. In which case the vet should find another way to get the medications down him (such as by injection.)
!2 Yo isn't real od for a dachshund I think, so something other than age must be wrong.
What was the vet's diagnosis? Why do you have medicine (prescription?) to give it?
It is possible to force pills down some dog's throats - look it up on the web, there must be good text with pictures. I can't do that with my Terrier, he is too stubborn - and will fight/bit if pushed too hard. So I feel you pain..