I can't speak for the people who voted to close, but here's my take on it:
The question posted was of the form "why doesn't this work".
The process for answering such a question consists of reading code and seeing if any errors jump out at us.
Most people on SO don't like to do this. Normally we like the OP to provide more specific information.
To be fair, normally the OP can provide more specific information than could have been provided in this instance, such as stack traces and error messages, but the question still had the appearance of an incomplete question. So what likely happened, is people saw things that the question had in common with the typical incomplete question, and voted to close based upon that pattern recognition.
Rather than just saying that the data isn't being inserted, maybe the OP could have posted the results of some query that demonstrate that it's not being inserted.
The answer to the question ended up being a simple typo fix, which makes this question closeable as too localized.