I am developing a system in which there will be several users accessing and editing records in a SQL database.

I want to study more about the solutions for the integrity of the information, and I don't know where to start.

My concern now is about the situation where 2 or more users might be editing the same record at the same time.

Where and how should I lock that record? In the ASP code or in the database?

What if the user who has the record locked for his/her edition, all of a sudden turns the computer off without submiting the transaction?

Could you point the direction where I should look for more information?

Thanks