Technology Blog

博客园 首页 新随笔 联系 订阅 管理

随笔分类 -  ASP.NET

ASP.NET technology
摘要:如果需要防止SQL注入,可以用SQL参数变量来传递记录值,这可以有效的防止SQL注入,下面就将为您介绍此方法,供您参考,希望对您学习SQL变量的使用能够有所启迪。public int ExecuteNonQuery(string sql,SqlParameter[]paras) { int res; using (cmd = new SqlCommand(sql, Getconn())) { //... 阅读全文
posted @ 2010-11-06 22:08 Joe Chen 阅读(894) 评论(0) 推荐(0)