Some scanners don’t use a standard RS-232 DCE or DTE pin-out, even though they use a DB-9 connector. Then they get to sell you a cable for an extra $30.
But before giving up, try a null modem cable or connector, in case the scanner uses standard wiring, but is wired as a DTE device instead of as a DCE device.
If that does nothing, google using the brand and numbers on the scanner and see if you can find the pin-out. If so, pick up a couple of DB-9 connectors from Radio Shack and make your own cable.
I’ve also seen serial scanners that use a special cable that was DB-9 on both ends, but had a place to plug in a separate power supply on the computer end. If that’s the case with yours, you might still be able to make your own cable if you can find the pin-out, but you’ll also need to get a compatible wall-wart power supply. Radio Shack has some universal ones that may work.
It may also be RS-422 instead of RS-232. In my experience, however, that’s fairly unusual for scanners.
Other scanners are wired to use what’s called a keyboard wedge. The scanner plugs into a cable or small box which also has a cable that looks just like a standard PC keyboard cable, and place to plug a keyboard in. You unplug your keyboard from the computer, plug the cable from the scanner wedge into the computer, and plug the keyboard into the wedge. The scanner is now “wedged” between the keyboard and computer. If this is the case with yours, you probably can’t use it as a serial device. Some are switchable to use either communication scheme, but most of the ones I’ve seen you order from the supplier as one or the other. And of course if it is a wedge type, you’ll probably need the manufacturer’s wedge connector.
The beauty of the wedge is that the output of the scanner is seen by the computer exactly the same as keystrokes from the keyboard. This means you can scan data into any application with no modification of the app. But you also usually lose programmatic control of the scanner.