using(SqlConnection conn=new SqlConnection("Data Source=AIR-PC\SQL2005;Initial Catalog=School;Integrated Security=true"))
{
string cmdstr="update 表 set where id=**";
using(SqlCommand cmd=new SqlCommand(cmdstr,conn))
{
conn.open();
cmd.ExecuteNonQuery();
}
}
纯手写 看的懂么