Getting error:
Failed to convert parameter value from string to a Int32
I write that code for my form and at finally when run the co
why you don't use
comm.Parameters.AddWithValue("@cod", T4.Text);
comm.Parameters.AddWithValue("@facultate", C1.Text);
comm.Parameters.AddWithValue("@domeniul", T1.Text);
...
comm.Parameters.AddWithValue("@d_inscriere", DTP1.Value);
...
etc
You are setting int parameter with strings like in:
comm.Parameters.Add(new SqlParameter("@cod", SqlDbType.Int) { Value = T4.Text });
You should parse the value in all these lines that are integers with something like:
comm.Parameters.Add(new SqlParameter("@cod", SqlDbType.Int) { Value = int.Parse(T4.Text) });