M
Michael
Hello,
I've noticed there are many ways to construct sql parameters, from something
simple like
cmd.Parameters.Add("@myvar", myvalue.text)
to actually specifying the sqldbtype/size such as
cmdUpdate.Parameters.Add("@name", SqlDbType.VarChar, 50, "name")
and you can get more complicated than that of course.
My question though, is there a reason I should go beyond my first example?
My queries work just fine like that, and when handling queries with many
parameters, it gets to be difficult and time consuming to have to manage all
the extra properties (though I do know ways to do it automatically). But
really, what is the benefit to it?
Thanks,
--Michael
I've noticed there are many ways to construct sql parameters, from something
simple like
cmd.Parameters.Add("@myvar", myvalue.text)
to actually specifying the sqldbtype/size such as
cmdUpdate.Parameters.Add("@name", SqlDbType.VarChar, 50, "name")
and you can get more complicated than that of course.
My question though, is there a reason I should go beyond my first example?
My queries work just fine like that, and when handling queries with many
parameters, it gets to be difficult and time consuming to have to manage all
the extra properties (though I do know ways to do it automatically). But
really, what is the benefit to it?
Thanks,
--Michael