We evaluate the ability of SPIDER, a balloon-borne polarimeter, to detect a divergence-free polarization pattern (B-modes) in the Cosmic Microwave Background (CMB). In the inflationary scenario, the amplitude of this signal is proportional to that of the primordial scalar perturbations through the tensor-to-scalar ratio r. We show that the expected level of systematic error in the SPIDER instrument is significantly below the amplitude of an interesting cosmological signal with r=0.03. We present a scanning strategy that enables us to minimize uncertainty in the reconstruction of the Stokes parameters used to characterize the CMB, while accessing a relatively wide range of angular scales. Evaluating the amplitude of the polarized Galactic emission in the SPIDER field, we conclude that the polarized emission from interstellar dust is as bright or brighter than the cosmological signal at all SPIDER frequencies (90 GHz, 150 GHz, and 280 GHz), a situation similar to that found in the Southern Hole. We show that two ~20-day flights of the SPIDER instrument can constrain the amplitude of the B-mode signal to r<0.03 (99% CL) even when foreground contamination is taken into account. In the absence of foregrounds, the same limit can be reached after one 20-day flight.