parameterized sql query - asp.net / c#

前端 未结 6 647
孤独总比滥情好
孤独总比滥情好 2021-01-18 20:03

So I recently learned that I should absolutely be using parametrized query\'s to avoid security issues such as SQL injection. That\'s all fine and all, I got it working.

6条回答
  •  长发绾君心
    2021-01-18 20:48

    or other variation you might try like this

    command.Parameters.Add(new SqlParameter("Name", dogName));
    

提交回复
热议问题