标题:继续求救啊。。。。。。。。。
取消只看楼主
cinderella0
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-8-29
 问题点数:0 回复次数:0 
继续求救啊。。。。。。。。。
谁能帮我看看,我的代码那错了,,,,为什么不能执行更新语句啊。。。。。
 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+"-----------------");
        Response.Write("update Message set huiyuanjiezhishijian='" + this.Text1.Value + "' where ID in(" + a +")"  + "-----------------");
        con.Close();
2008-09-27 16:17



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




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

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