Is it necessary to add a @ in front of an SqlParameter name?

前端 未结 4 1961
逝去的感伤
逝去的感伤 2020-11-27 08:19

In one of our application the parameters passed to a stored procedure in this way

Dim parm As New SqlParameter(\"searchText\", SqlDbType.VarChar)
parm.Direct         


        
4条回答
  •  爱一瞬间的悲伤
    2020-11-27 09:02

    I recommended you to use add "@" marker with your parameter name. SqlParameter helps to add automatically, but others' parameter might not to.

提交回复
热议问题