command.Parameters.Add("@BrandName", SqlDbType.VarChar);
command.Parameters.Add("@BrandName", SqlDbType.VarChar,50);
The above are two possible ways to add a parameter on SqlCommand, is there any benefit on specifying the value 50.
command.Parameters.Add("@BrandName", SqlDbType.VarChar);
command.Parameters.Add("@BrandName", SqlDbType.VarChar,50);
The above are two possible ways to add a parameter on SqlCommand, is there any benefit on specifying the value 50.
I don't know but it may trim the string before executing DML statement, it sure better than doing such via SQL engine. Jusing guessing good question (Y)
And it may have no effect
well, this has being bugging me for a while, tanks for the reply
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.