Does this actually work? I'd be mildly surprised if it did, since you're asking the database to pull commands out of what is being bound as a string (or precisely, SQL_VARCHAR). This sort of thing is better done at the application level, since it alone knows what type of value is being inserted.