Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / December 2005



Tip: Looking for answers? Try searching our database.

Record Locking

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Coder23 - 17 Dec 2005 06:09 GMT
I created a simple web-app for the company I work at.  It consists of several
'queues' (new, pending, completed, etc...) each containing records which are
customer cases.

Each user should only be able to open a case that is not being viewed/worked
by any other user.  This is accomplished by checking if a field named
"AgentOwner" is empty.  If it is empty, the app stamps the user's ID into the
field and displays the data.... if the field is already occupied with
another's ID, the app returns a message stating that agent 'ab12345' has the
case open.

This locking method works fine in a single processor environment. (No
problems.)

We recently moved the app to a quad-processor server.  That's when the probs
began.  Here's the issue:  When two or more agents select the same record at
the same time, they're all able to pull the same case.  (This is not good.)

It's as if, each processor is taking on the page requests simultaneously
..... or maybe the server it too fast for the database to keep up with the
record updates.

I've tried different cursors / locktypes when opening the recordset to no
avail.
Cursors:
 Static
 Dynamic
 Forward Only

LockTypes:
 adLockOptimistic
 adLockPessimistic

I've also tried SQL UPDATE statements through the connection object.....
this doesn't work either.  (in fact it's a slower update)

Has anyone come across a similar situation?
Is there anyway to specify/force IIS to utilize only one CPU for certain
.asp pages?

specs:
 IIS 5.0
 MS Access 2000     (I know, I know...... it's a small webapp)

any suggestions are appreciated.  Thanks.
Bob Barrows [MVP] - 17 Dec 2005 13:19 GMT
> I created a simple web-app for the company I work at.  It consists of
> several 'queues' (new, pending, completed, etc...) each containing
[quoted text clipped - 42 lines]
>
> any suggestions are appreciated.  Thanks.

I suspect you are running into the Jet delayed-write "optimization". There
is a KB article about how to deal with it. Let me see if i can find it ....
yes, here it is:
http://support.microsoft.com/support/kb/articles/q200/3/00.asp

Bob Barrows

Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Coder23 - 21 Dec 2005 03:33 GMT
Thanks Bob,
this helped better understand the issue.
problem resolved.     : )

> > I created a simple web-app for the company I work at.  It consists of
> > several 'queues' (new, pending, completed, etc...) each containing
[quoted text clipped - 49 lines]
>
> Bob Barrows
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.