He already is using prepared statements, that happens under the hood when you use parameterized queries. Problem is the lack of type definition (in the first revision), causing a new compilation for each length of the varchar column.
One warning about this is that at times you should consider having a new plan generated - especially if the data changes over time.