Posted By: dotnetjunkie | Nov 11th, 2006 @ 8:23 PM
page 1 of 1
Comments: 1 | Views: 3011

For SqlParameters, what is best?

.AddWithValue("@Param", value)
or
.AddWithValue("Param", value)

So with or without the @ ?
They both work, but is one recommended over the other?
It would be interesting to know if under the hood the @ is added if you omit it or rather stripped off if you put it in!

Both do the same. It's not important if the @ is added or not Smiley I think it's added because by convention the SqlParameter.Name should start with an @.
page 1 of 1
Comments: 1 | Views: 3011