Solved

Datbase Concurrency

Posted on 2004-04-26
4
180 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 63 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 62 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now