Good practices for using typed data when passing / adding your parameters.
Below you can complete the task as shown below:
For data with the / varchar line:
SqlParameter pVarchar = new SqlParameter { ParameterName = "Test", SqlDbType = System.Data.SqlDbType.VarChar, Value = string.Empty, };
For the entered data:
SqlParameter pInt = new SqlParameter { ParameterName = "Test", SqlDbType = System.Data.SqlDbType.Int, Value = 0, };
You can change the value of SqlDbType according to your data used.
Elias Hossain Dec 02 '11 at 6:15 2011-12-02 06:15
source share