mySqlCommand.ExecuteNonQuery()这不是执行SQL语句的吗?怎么能够去掉
解决方案 »
- 如何取得GridView模版列的值?
- 很急!高分求救!!GridView中DropDownlist的怪异问题!!!
- 在MasterPage中Treeview无法打开sitemap中的相关url网页
- DataList外的怎么获取DataList里面的控件
- Ajax在Asp.net中的应用
- asp.net如何实现图书收藏功能
- 请教,在asp.net中如何将参数放入Form中传递?(必须放Form中)
- freetextbox 问题,请大家帮帮忙!在线等。。。。
- 急求急求!请问ASP.NET判断长度为何说Len没定义??
- XML提问,有劳大家帮助!!!急
- DataGrid的ItemTemplate中怎样获取绑定的数据值?
- GROUP BY再问?
{
myConnection.Open();
SqlCommand mySqlCommand=new SqlCommand(strSQL,myConnection);
mySqlCommand.ExecuteNonQuery();//关键在这里出问题
Label1.Text="注册成功";
}
catch (Exception ex)
{
Label1.Text= ex.Message;
if (ex.InnerException != null)
Label1.Text += ex.InnerException.Message; }
finally
{
myConnection.Close();
}
also, use string concatenation to form SQL is susceptible to SQL injection attack, use Parameter approach, seehttp://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetch12.asp?frame=true