SqlCommand.Prepare method requires all parameters to have an explicitly set type

前端 未结 2 1317
时光取名叫无心
时光取名叫无心 2021-01-18 19:40

I have the following snippet of code in my WCF web service that builds a set of where conditions according to the formatting of the values of a provided dictionary.

2条回答
  •  無奈伤痛
    2021-01-18 20:39

    If you read the documentation, you'll see that when you're using SQLCommand.Prepare, you need to use Parameters.Add and assign a datatype to each parameter. There is a good code sample in that link that will show you how to do it.

提交回复
热议问题