You can question whatever you want. It's your code, after all.
But you need to know the number of parameters in order to create an SQL string with the correct number of placeholders. So DBI checks the number of parameters for you for free.
You get an extra layer of defensive programming for no cost. I can't see any reason why you wouldn't want to make use of it.
| [reply] |
I think that it would be good when SELECT is used in a similar circumstance. But when that particular feature is used with EXEC I believe it is redundant code and therefore is best not used.
| [reply] |
But what is redundant? What would you remove? Like I said, this is a completely free feature. There is no code in there which specifically checks for the right number of parameters, it's just something that execute gives you for free.
There is no redundancy. There is nothing to remove. If you find something to remove then I'd love to see it.
| [reply] |