G
Guest
I have a table that will not allow some values to be altered if the tuple
being updated meets certain requirements.
I have a stored procedure that individually updates each value in a tuple if
the relevant parameter is not null (all parameters default to null exept the
PK).
In this way I can use the stored proc to update non critical values (for
example descriptions) while the critical values are effectively locked. This
is fine when I deal with the data directly (ie without a DataTable).
when editable can use: sp_Update @id=1, @desc="xxx", @val=45
when not edit can only use: sp_Update @id=1, @desc="yyy", @val=dbnull
What I want to be able to do is update from a DataTable preferably using a
DataAdapter that will invoke the stored procedure with only the relevant
parameters for DataTable row.
In the DataTable it is possible to revert back to the original values by
calling DataTable.RejectChanges(). Is there some way that I can use this to
determine if particular values have changed for each DataTable row so that I
can invoke the stored procedure with only the relevant parameters? And if
this is possible is it also possible to make a DataAdapter sensitive to this?
being updated meets certain requirements.
I have a stored procedure that individually updates each value in a tuple if
the relevant parameter is not null (all parameters default to null exept the
PK).
In this way I can use the stored proc to update non critical values (for
example descriptions) while the critical values are effectively locked. This
is fine when I deal with the data directly (ie without a DataTable).
when editable can use: sp_Update @id=1, @desc="xxx", @val=45
when not edit can only use: sp_Update @id=1, @desc="yyy", @val=dbnull
What I want to be able to do is update from a DataTable preferably using a
DataAdapter that will invoke the stored procedure with only the relevant
parameters for DataTable row.
In the DataTable it is possible to revert back to the original values by
calling DataTable.RejectChanges(). Is there some way that I can use this to
determine if particular values have changed for each DataTable row so that I
can invoke the stored procedure with only the relevant parameters? And if
this is possible is it also possible to make a DataAdapter sensitive to this?