Lets say I have a table that has a bit column named Active
. By default, the column will contain a value of false for every row except one. When I choose to use a gridview to update a new row and have its 'Active' column change from false to true...
How can I modify the following update command to update all previous rows to false when a new row is to be set to true. ( I only want to have one row be set to active(true) at a time in this table).
UpdateCommand="UPDATE [RbSpecials]
SET [Name] = @Name,
[Description] = @Description,
[Active] = @Active
WHERE [ID] = @ID">