dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


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

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


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?

DevX Pro
 
Comment and Contribute

 

 

 

 

 


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

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date