You haven't stated what your problem actually is, but from this link
MySqlCommand.ExecuteNonQuery[
^]
I can say that your code is correct. But also I would follow ^Mo^'s suggestion as this will help you against SQL Injection
Updated
your for loop is creating one string that contains 161,953 update statements that are not terminated and then you try to execute it. Personally I would try something like this
for (int i = 1; i <= 161953; i++)
{
str.Append("update commonparmarth");
str.Append("set receiptnoid=" + no + "");
str.Append("where accountid=" + Accountid + "and commonparmarthid=" + i + "");
no++;
MySqlCommand command = new MySqlCommand(str.ToString(), con, tran);
command.ExecuteNonQuery();
str.clear();
}