The poloidal rotation of C V ions has been deduced, in the TJ-II stellarator, from spectral line shifts measured using a high-spectral-resolution spectrometer and a nine-fiber-channel system. Analysis of the data obtained has shown that a change of sign of the poloidal rotation direction occurs that depends abruptly on plasma density but is independent of the heating method. Whereas in low-density plasmas the poloidal direction corresponds to a positive radial electric field, at higher densities negative radial electric fields are deduced from the measured poloidal rotation. These measurements are in qualitative agreement with neoclassical theory calculations that predict a change in the sign of the radial electric field mainly because of a change in the ratio of the electron-to-ion temperature.