Choosing the right drug may still lead to failure in eradicating the infection if the appropriate dose is not administered. Bactrim can often be difficult to dose especially in the setting of kidney disease. The following article addresses dose adjustments for Bactrim.
Drug summary published by PDR (Prescribers Digital Reference)
https://www.pdr.net/drug-summary/Bactrim-Bactrim-DS-sulfamethoxazole-trimethoprim-686