摘要:
首先:不防SQL注入 int Id =1; string Name="lui"; cmd.CommandText="insert into TUserLogin values("+Id+",'"+Name+"')"; 因为Id是数值,所以在传递的时候只需要在sql字符串中用"+Id+"即可实现,而N... 阅读全文
posted @ 2011-11-08 10:23
风与雨无阻
阅读(1001)
评论(0)
推荐(0)
摘要:
红颜色的为重要代码 SqlConnection con = DBCommon.GetSqlConnection();//SqlCommand cmd = con.CreateCommand();//创建存储过程SqlCommand cmd = new SqlCommand("Sp_drugStock... 阅读全文
posted @ 2011-11-08 10:21
风与雨无阻
阅读(505)
评论(0)
推荐(0)
摘要:
一般是这样的,如果用设计器将SqlDataAdapter拖到页面中使用时,不会出现SqlDataAdapter.Update(ds)更新时出错情况,因为系统会自动生成SqlDataAdapter的属性命令,比如:.UpdateCommane insertCommand selectCommand... 阅读全文
posted @ 2011-11-08 10:18
风与雨无阻
阅读(251)
评论(0)
推荐(0)
浙公网安备 33010602011771号