I could be wrong but I think if you are transiting and don't leave the airport then you will not need a visa as long as you leave within 24hrs..
With regard to the dress code, when in the airport the customary black trash bag that ALL women must wear while in Saudi, is not required, but as previous poster said, dress modestly and avoid amorous saudi men in the terminal.
RUH is also the most conservative of Saudi cities as it is populated by mostly unsphisticated, religious bedouin nut jobs...
Flying with Saudia is terrible, nothing to drink and they even censor cartoons for being revealing!