record-locking

Storing Record Lock Tokens in ASP.NET

In the application that I'm currently working on, it is possible for multiple users to want to edit something at the same time which means that we need to implement optimistic locking. However, for this application, the item being edited is a scientific protocol that contains records from multiple different tables in the database. As s...

Why is this query slow? Should I use MyISAM rather than InnoDB here?

I'm getting these about 5 times an hour in my slow query logs: # Query_time: 11.420629 Lock_time: 0.000033 Rows_sent: 0 Rows_examined: 0 SET timestamp=1267487708; INSERT INTO record_lock (record_lock.module_id, record_lock.module_record_id, record_lock.site_id, record_lock.user_id, record_lock.expiration_date_time, record_lock.date_ti...

How can I get SQL Server transactions to use record-level locks?

We have an application that was originally written as a desktop app, lo these many years ago. It starts a transaction whenever you open an edit screen, and commits if you click OK, or rolls back if you click Cancel. This worked okay for a desktop app, but now we're trying to move to ADO.NET and SQL Server, and the long-running transactio...

Do we need Record Level Locking when we already have Transaction for online ordering? (of concert ticket or airline booking)

For online ordering of concert seats or airline tickets, do we need Record Level Locking or is Transaction good enough? For concert ticket (say, seat Number 20B), or airline ticket (even with overbooking, the limit is 210, for example), I think the website cannot lock any record or begin transaction when showing the ticket purchase scre...

How to lock a record when two members are trying to access it?

I have the scenario like this, My environment is .Net2.0, VS 2008, Web Application I need to lock a record when two members are trying to access at the same time. We can do it in two ways, By Front end (putting the sessionID and record unique number in the dictionary and keeping it as a static or application variable), we will relea...