M
marc
It surprises me that there is no constructor for SqlParameter
with parameters for name, the SqlDbType, size AND VALUE (?).
There's of course this constructor :
SqlParameter pm01 = new SqlParameter("@fieldname", SqlDbType.Int, 4);
But then you will always have to set the value separtly, like this :
pm01.Value = 42;
command.Parameters.Add(pm01);
Why is there no better alternative for this ?
Am I missing something here ?
with parameters for name, the SqlDbType, size AND VALUE (?).
There's of course this constructor :
SqlParameter pm01 = new SqlParameter("@fieldname", SqlDbType.Int, 4);
But then you will always have to set the value separtly, like this :
pm01.Value = 42;
command.Parameters.Add(pm01);
Why is there no better alternative for this ?
Am I missing something here ?