标题:[求助问题出在哪里〉???
取消只看楼主
wamdqpi
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-8-6
 问题点数:0 回复次数:0 
[求助问题出在哪里〉???

修改数据库的sql语句 private void Button1_Click(object sender,EventArgs e) { string strConn="server=Localhost;uid=sa;pwd=137;database=qxdata"; string strCmd="update ldjh set title='"+TextBox1.Text+"' content='"+TextBox2.Text+"' name='"+TextBox3.Text+"' department='"+TextBox4.Text+"' where ID = '"+Label1.Text+"'"; SqlConnection myConnection = new SqlConnection(); myConnection.ConnectionString=strConn; myConnection.Open(); SqlCommand myCommand=new SqlCommand(strCmd,myConnection); myCommand.ExecuteNonQuery(); myCommand.Connection.Close(); myConnection.Close();

}

搜索更多相关主题的帖子: department content private sql语句 server 
2005-08-21 15:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-25708-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.147934 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved