By using nonequilibrium Green's functions in combination with the density functional theory, the spin transport properties of a single-molecule spintronic device are investigated. The computational results show that when the magnetic configuration of the device is set as parallel, the perfect spin-filtering effect can be observed. Especially, this perfect spin-filtering effect is independent of the number of carbon atoms in the carbon chain. However, when the magnetic configuration is set in antiparallel, the spin-filtering effect displays a strong odd-even oscillatory characteristic, namely, the spin-filtering efficiencies of odd-numbered chain systems have a higher values than even-numbered chain systems. Moreover, the magnetoresistance effect can also be observed in this single-molecule spintronic device. In contrast to the odd-even oscillatory characteristic of the spin-filtering effect in the antiparallel magnetic configuration, high magnetoresistance ratios belong to even-numbered chain systems while low magnetoresistance ratios belong to odd-numbered chain systems. The mechanisms are suggested for these interesting phenomena.