标题:“)”处有错???
取消只看楼主
紫小念
Rank: 1
来 自:山东
等 级:新手上路
帖 子:27
专家分:0
注 册:2013-5-14
结帖率:60%
已结贴  问题点数:10 回复次数:0 
“)”处有错???
String s = "server=.;database=SampleDb;integrated Security=true;";
            SqlConnection conn = new SqlConnection();
            conn.ConnectionString = s;
            SqlCommand com = new SqlCommand();
            String sql = String.Format("delete from Lesson  where Id='{0}' and  Name='{1}')",textBox1.Text,textBox2.Text);
            com.Connection = conn;
             = sql;
            conn.Open();
            int n = com.ExecuteNonQuery();

            conn.Close();
            MessageBox.Show("删除成功");
搜索更多相关主题的帖子: database server where 
2013-12-14 16:49



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




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

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