在线再次问各位一个问题 else { Label2.Text = "失败,是否继续?"; Button1.Visible=false; reader.Close(); } con.Close(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public void update_shipping_container_status() { SqlCommand mycon = new SqlCommand("update carrier set service='TTTA' where carrier='" + TextBox1.Text.ToString() + "'", con); mycon.ExecuteNonQuery(); con.Close(); }修改为:public void update_shipping_container_status() { con.Open(); SqlCommand mycon = new SqlCommand("update carrier set service='TTTA' where carrier='" + TextBox1.Text.ToString() + "'", con); mycon.ExecuteNonQuery(); con.Close(); } C#调用C++函数问题 WinForm程序的WebBrowser 急! 用C#语言开发WPF LED时钟? 一个关于围棋提子的问题, ComboBox.Items.IndexOf(???); 如何数据库连接放到统一的位置? 如何将分布式(Remoting)通过IIS架起来! 如何用C#来实现自已的文件数据库 C#实现画流程图 C#有沒有像VB的IsDate一樣功能的函數? 想请教个验证问题 ADO.net
{
SqlCommand mycon = new SqlCommand("update carrier set service='TTTA' where carrier='" + TextBox1.Text.ToString() + "'", con);
mycon.ExecuteNonQuery();
con.Close();
}
修改为:
public void update_shipping_container_status()
{
con.Open();
SqlCommand mycon = new SqlCommand("update carrier set service='TTTA' where carrier='" + TextBox1.Text.ToString() + "'", con);
mycon.ExecuteNonQuery();
con.Close();
}