That said, I caution you against using AddWithValue(). This must infer the types being passed into the string -- and any time code is not explicit, there is a danger of misinterpretation. Here, for instance, is a blog post explaining why this isn't a good idea.