Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Datbase Concurrency

Posted on 2004-04-26
4
Medium Priority
?
196 Views
Last Modified: 2010-04-11
I want to ask that i have made a project for Problem Logging System using Java Servlets . The system will be run on LAN & hence many users can simultaneously perform the same event .
I am using Microsoft Access as my Backend & there is a field called "ProblemId" which is generated as the maximum of ProblemID (so far) plus 1 that is if the maximum ProblemID so far is 0 then 1 will be assigned to next ProblemId which is stored in the Database .
I wanted to ask is what problems will arise when 10 users simultaneouly click on the event which generates this ProblemID . will the database or the servlet take care of it by itself or will it cause any problem .
      PLZ HELP ,its Urgent
0
Comment
Question by:yatin_k26
4 Comments
 
LVL 1

Accepted Solution

by:
jean4GetIt earned 252 total points
ID: 10918595
Acces takes care of this.

You can look into the environment settings.
He automaticly locks the record for the first user. You can set this off.
0
 
LVL 3

Assisted Solution

by:Beluga
Beluga earned 248 total points
ID: 11030766
Just wondering if there's a reason that you can't set the ProblemID field to type "Counter" in the Access table design? This would generate the ProblemID number automatically as soon as a new record is created. The database engine will automatically take care of multiple requests.

Doing this in a seperate program may be a problem. After the program has read the maximum value, and before it writes a new record, the database will be unlocked. So someone else could come along and get the same maximum value and the same new value. You'd end up with either two records with the same ProblemID, or a database integrity error. So yes, if you haven't found a way around this, it could be a problem!
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ransomware - Defeated! Client opened the wrong email and was attacked by Ransomware. I was able to use file recovery utilities to find shadow copies of the encrypted files and make a complete recovery.
This article is about my experience upgrading my consulting machine to Windows 10 Version 1709 (The Fall 2017 Creator Update)
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question