The shared code doesn't have the logic for insertion, instead it is meant for updation.
Note: I am using the answer section as you still have issue in the peiece of code you have shared here. Please have a look.
Hav a look at
WHERE condition of your query. Are you are missing someting like-
WHERE IsActice=1 AND SomeId=@SomeId
Your current query should update all the records with
IsActice=1 and hence you should see the changes done only in the last updation.
Note: You should use parameterized query or stored procedure instead of inline queries to avoid SQL Injection.