ExecuteNonQuery inside loop
It looks like you are adding to the command's parameter collection over and over. Clear it with each iteration.
I would also suggest throwing the actual exception so you can see what the problem is.
Tested & simple solution. If you are using parameters in loop You need to clear the parameters after execution of query. So you can use that
cmd3.executeNonQuery();
cmd3.Parameters.Clear();