Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Informix
Expertise: Beginner
Aug 9, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Locking Rows

We are developing an intranet application using visual interdev on windows 2000 and our informix database is on unix.

We are using stored procedures and the 'begin work' and 'commit' statements to update, insert and delete. We can lock the rows while in the stored procedure. However, we need to lock the row while the user is making changes on the intranet and not release it until the update statement has been committed.

I don't quite see a question here, but I'll give you a few suggestions that may be helpful. First, try to keep the lock as short as possible. I would not initiate the lock until after the user is ready to send the changes. If that's not possible, restrict the effect of the lock as much as possible. You may want to alter the locked row's table to row level locking rather than the default page level locking.

The problem with locking is that it can cause concurrency problems, especially in a case where the lock is held for a very long time. What happens if you lock the rows when the user first enters the page and the user either loses his connection or decides to go to lunch, or worse yet, on vacation?

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date