Yes, you're doing it wrong.
Here's how yo connect up a relay and a transistor, the input goes to the output of the LM741.
**broken link removed**
Incidentally, the 741 isn't the best device to use as a comparator, it's designed to be used as a linear amplifier rather than a comparator. If you need a comparator then it's better to use a device specifically designd for the purpose such as an LM393 or LM311, the latter can drive a relay without the need for a separate transistor.