标题:求救啊~!!!!
取消只看楼主
cinderella0
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-8-29
 问题点数:0 回复次数:2 
求救啊~!!!!
我的代码那错了啊。。。。。
       CollectSelected();

        this.TextBox6.Text = string.Empty;
        foreach (object tmp in this.SelectedItems)
            this.TextBox6.Text += tmp.ToString() + ",";
        string a = this.TextBox6.Text;        
        a = a.TrimEnd(',');
        SqlConnection con = new SqlConnection("server=localhost;database=User;user=grid;password=grid");
        con.Open();
        SqlCommand com = new SqlCommand("(update Message set huiyuanjiezhishijian='" + this.Text1.Value + "' where ID in('" + a +"'))", con);
        SqlDataAdapter da = new SqlDataAdapter(com);
        DataSet ds = new DataSet();
        Response.Write(a+"-----------------");
        con.Close();
为什么数据没有更新啊。。。。。。。
搜索更多相关主题的帖子: localhost password database server update 
2008-09-27 15:43
cinderella0
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-8-29
得分:0 
不行啊,还是不行。。。。。。。。数据更新不进去。。。。。。。。
2008-09-27 16:09
cinderella0
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-8-29
得分:0 
我的ID是字符串。不能那么写的,只能用where id in()这个形式。。。。
2008-09-27 16:10



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




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

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