G
Greg
Not sure if this post belongs here but here goes.
We call DataAdapter.Update where the CommandText is an sproc name. Inside
the sproc, we have numerous IF statements. I was recently told these IF
statements would cause the sproc to recompile each time it is called. is
this correct?
We use the IF statements to compare the original value of a field to the
value passed in (the current value). If they are different, we update the
field. There are 160 fields in this record, so we have at least 160 IF
checks.
I am also informed that every time we use a SELECT statement, if a record is
returned, RowsAffected is set to 1. So, if an update fails, we still see
the value 1 on the return from the call to Update. How does one work around
this?
We call DataAdapter.Update where the CommandText is an sproc name. Inside
the sproc, we have numerous IF statements. I was recently told these IF
statements would cause the sproc to recompile each time it is called. is
this correct?
We use the IF statements to compare the original value of a field to the
value passed in (the current value). If they are different, we update the
field. There are 160 fields in this record, so we have at least 160 IF
checks.
I am also informed that every time we use a SELECT statement, if a record is
returned, RowsAffected is set to 1. So, if an update fails, we still see
the value 1 on the return from the call to Update. How does one work around
this?