Locking Rows

Question:
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.

Answer:
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?

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS