I notice this old question just got bumped with a recommendation to use sqlscripter. Is this spam, or does it have to be off topic to count as spam?
Related but inconclusive: Are there guidelines on what to flag as spam?
In this case, I'd say it's spam; the user account's website also points to sqlscripter.com, and the user was created IMO for the sole purpose of driving traffic in that direction. It's topical, yes, and that's a very gray area.... but for this specific case I vote spam.
With respect to the old question you linked, the shareware that is referenced is directly on topic with the question. It is not spam if it answers the OP's question.
You can't go wrong with Wikipedia's definition of spam: "The abuse of electronic messaging systems to send unsolicited bulk messages indiscriminately." Note the use of the words, "bulk" and "indiscriminately."
I would normally vote down that answer. It's a generic quip (you could definitely call it "indiscriminate") about the product without actually responding to the question. I've looked at the product's website, and I'm not sure it can even do what is asked, even if it is in the same ballpark as the question's topic.
In contrast, another answer there is by a user who did seem to have read each question—even though every answer is formulaic and almost identical. It's customized just enough that the comparison is huge. (But some of his posts are generic and worse.)
At least for me.
About spam in general, for answers I have a simple rule: if you care more about someone reading it than about solving a problem, it's likely spam. I don't require there to be a commercial interest.
For questions I'm not sure how to generalize criteria, but I'll know spam when I see it.
Wait a second. Is your question really a genius way of getting us to check out that product? Did we all just get spam-rolled?
Seriously, he posted one answer to a question that was asked over a year and half ago. Not very timely is it? The domain name in his answer is also in his bio. He's constantly promoting it on other message boards. The user's name is Thomas. The first name of the domain name registrant is... Thomas!
Your Honor, this is spam.
For me, spam is a question that isn't really a question but says something like:
Take a look at FOOBAR - you'll really like it!
On the other hand, an answer that said the same thing would not be spam, provided FOOBAR is a possible solution to the problem posed by the question.