关于一个C#下SQL更新问题!
protected void Button1_Click(object sender, EventArgs e)
{
string se = Session["姓名"].ToString();
string password = TextBox1.Text.ToString();
//连接数据库
SqlConnection cn = new SqlConnection("server=JIALIA;uid=sa;pwd=sa;database=JR_WebDatabase");
cn.Open();//打开数据库
//执行SQL语句
string strSQL = String.Format("Update JR_Conscionsness Set [密码]='{0}' WHERE [姓名]='{1}'",password,se);
SqlCommand cmd = new SqlCommand(strSQL, cn);
TextBox1.Text = "";
cn.Close();//关闭数据库
}
请问我这个程序那里有问题?
{
string se = Session["姓名"].ToString();
string password = TextBox1.Text.ToString();
//连接数据库
SqlConnection cn = new SqlConnection("server=JIALIA;uid=sa;pwd=sa;database=JR_WebDatabase");
cn.Open();//打开数据库
//执行SQL语句
string strSQL = String.Format("Update JR_Conscionsness Set [密码]='{0}' WHERE [姓名]='{1}'",password,se);
SqlCommand cmd = new SqlCommand(strSQL, cn);
TextBox1.Text = "";
cn.Close();//关闭数据库
}
请问我这个程序那里有问题?
...全文
相关推荐
C# 版SQL美化解析器源码项目
2012年5月的C#版的开源项目,SQL美化解析功能强大,值得学习参考。
C#执行sql文件 运行sql文件
C#执行.sql文件 自动运行sql文件 已经成功使用此方法 做项目时已经使用过
Discuz! SQL Server 源码_C#论坛社区程序.rar
Discuz! SQL Server 源码_C#论坛社区程序
Discuz! SQL .Net_C#论坛社区程序.rar
Discuz! SQL .Net_C#论坛社区程序
C#手把手教你做一个学生考试系统,附带SQL数据库
对于新手来说,很多人还不会一些窗体设计和消息响应的添加,本项目将手把手教你做一个学生考试管理系统


