In this paper we exactly solve the diffusion-advection equation for cosmic-ray transport. With this purpose we use the Theory of Ultradistributions of J. Sebastiao e Silva, to give a general solution for this equation. From this solution, we obtain several approximations as limiting cases of various situations of physical and astrophysical interest. One of them involves Solar cosmic-rays' diffusion.