SqlCommand.Parameters

  • Thread starter Thread starter Brian Toothill
  • Start date Start date
B

Brian Toothill

I'm setting SqlDataAdapter.UpdateCommand (.CommandText and .Parameters).
Say the table to which I'm applying this command has a lot of columns - does
that mean I have to add a parameter (.UpdateCommand.Parameters.Add()) for
every column that I want to update (or every column that may potentially
change)?

On the same note, does that mean I have to add (to CommandText) something
simliar to "columnN = @colN" for every column?

So if my table has 50 columns, then my UpdateCommand will have 50
Parameters?

Am I asking the right questions / going about this the 'done' way?
 
Yup, you are correct.
You might use data wizard to create the adapter and commands for you..
 
Back
Top