Failed to convert parameter C# / SQL Server

前端 未结 2 1811
我寻月下人不归
我寻月下人不归 2021-01-26 02:47

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

2条回答
  •  太阳男子
    2021-01-26 03:01

    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
    

提交回复
热议问题