That's quite a long-winded way of creating the parameter but if you do it that way you also need to set the size
op1.SqlDbType = System.Data.SqlDbType.varchar;
op1.Size=50;
Alternatively you could do it all on one line..
SqlParameter op1 = new SqlParameter("@name", System.Data.SqlDbType.VarChar, 50);