Please Clarify my doubts here.What is the mojor difference here.
1) command.Parameters.AddWithValue("@Age", ageTextBox.Text);
2)command.Parameters.Add("@Age",SqlDbType.Int,2).Value=ageTextBox.Text
This is what i know in terms of difference.Please correct me if i do any mistakes.
Statement1 - AddWithValue always sends nvarchar value to the database.my doubts is - if i created a column[ say Age Field] in database where its datatype in integer.so i use addwith value,it will send a nvarchar to the database so Datatype mismatch here.Does it throw any error ?