Will implicit data type conversion in SQL affect performance?
- by dboarman-FissureStudios
I have 2 samples that effectively do the same thing --
Sample 1:
command.Parameters.Add(ParamFoo, SqlDbType.Int)
command.Parameters(ParamFoo).Value = fooVal
Sample 2:
command.Parameters.AddWithValue(ParamBar, barVal)
Which sample would be recommended? I know that the second sample is making some conversions. Wouldn't it be best to not require conversions and go with the first sample?