cmdGetAll = new SqlCommand();
cmdGetAll.Connection = cnDataTable;
string command = "update Login set password='"+password+"',TrueName='"+TrueName+"',Email='"+Email+"',Telephone='"+Telephone+"',Sex='"+Sex+"',Oicq='"+Oicq+"',HomePage='"+HomePage+"',address='"+Address+"',JieShao='"+JieShao+"' where (name='"+name+"')";
cmdGetAll.CommandType = CommandType.Text;try
{
cnDataTable.Open();
cmdGetAll = new SqlCommand(command,cnDataTable);
int i = cmdGetAll.ExecuteNonQuery();
Response.Write(i);
Response.Redirect("Success.aspx");
}
catch(SqlException ex)
{
Response.Write(ex.Message);
}
finally
{
cnDataTable.Close();
}
cmdGetAll.Connection = cnDataTable;
string command = "update Login set password='"+password+"',TrueName='"+TrueName+"',Email='"+Email+"',Telephone='"+Telephone+"',Sex='"+Sex+"',Oicq='"+Oicq+"',HomePage='"+HomePage+"',address='"+Address+"',JieShao='"+JieShao+"' where (name='"+name+"')";
cmdGetAll.CommandType = CommandType.Text;try
{
cnDataTable.Open();
cmdGetAll = new SqlCommand(command,cnDataTable);
int i = cmdGetAll.ExecuteNonQuery();
Response.Write(i);
Response.Redirect("Success.aspx");
}
catch(SqlException ex)
{
Response.Write(ex.Message);
}
finally
{
cnDataTable.Close();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货