A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Locking for multiple user access ?



 
 
Thread Tools Display Modes
  #1  
Old August 10th, 2007, 03:22 PM posted to microsoft.public.access.tablesdbdesign
mscertified
external usenet poster
 
Posts: 835
Default Locking for multiple user access ?

My application will have a table being inserted to via a web page.
The Access database will be in constant use by multiple users.
Periodically, users will need to pull items (read then delete) from the
queue in first-in first-out basis.
My concern is to avoid conflicts between pulling from the queue and records
being inserted via the web page (via ODBC connection) and also between
different users pulling from the queue simultaneously. I guess I need some
type of exclusive lock which will force other users to wait and retry. Has
anyone done anything similar?

  #2  
Old August 10th, 2007, 05:15 PM posted to microsoft.public.access.tablesdbdesign
Sylvain Lafontaine
external usenet poster
 
Posts: 528
Default Locking for multiple user access ?

Excerpt if you have a very strange business case, usually you don't have to
use such a lock when multiple users are accessing a database from a web page
and insertions/deletions/updates will be managed correctly by the ODBC
driver. You might have problems if the *same* record is edited by multiple
users but this is another story.

Try it and see what happens. If this doesn't work, come back here
(preferably by starting a new thread) and show us an example of your data
with an explanation of why it doesn't work.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"mscertified" wrote in message
...
My application will have a table being inserted to via a web page.
The Access database will be in constant use by multiple users.
Periodically, users will need to pull items (read then delete) from the
queue in first-in first-out basis.
My concern is to avoid conflicts between pulling from the queue and
records
being inserted via the web page (via ODBC connection) and also between
different users pulling from the queue simultaneously. I guess I need some
type of exclusive lock which will force other users to wait and retry. Has
anyone done anything similar?



  #3  
Old August 10th, 2007, 05:36 PM posted to microsoft.public.access.tablesdbdesign
mscertified
external usenet poster
 
Posts: 835
Default Locking for multiple user access ?

Well since multiple users could be pulling from the queue at the same time,
they could well both be trying to read the same record. It is impossible for
me to try this since I have only a single logon id.
I was hoping someone could offer guidance or experience.

"Sylvain Lafontaine" wrote:

Excerpt if you have a very strange business case, usually you don't have to
use such a lock when multiple users are accessing a database from a web page
and insertions/deletions/updates will be managed correctly by the ODBC
driver. You might have problems if the *same* record is edited by multiple
users but this is another story.

Try it and see what happens. If this doesn't work, come back here
(preferably by starting a new thread) and show us an example of your data
with an explanation of why it doesn't work.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"mscertified" wrote in message
...
My application will have a table being inserted to via a web page.
The Access database will be in constant use by multiple users.
Periodically, users will need to pull items (read then delete) from the
queue in first-in first-out basis.
My concern is to avoid conflicts between pulling from the queue and
records
being inserted via the web page (via ODBC connection) and also between
different users pulling from the queue simultaneously. I guess I need some
type of exclusive lock which will force other users to wait and retry. Has
anyone done anything similar?




  #4  
Old August 10th, 2007, 06:59 PM posted to microsoft.public.access.tablesdbdesign
Sylvain Lafontaine
external usenet poster
 
Posts: 528
Default Locking for multiple user access ?

Yes, you must add some flag to tell that a record have been read by someone.
However, this will not be easy to do with ODBC and JET. With ASP, you could
use something like Application.Lock and Application.Unlock to make sure that
only one person at a time read a record and set its flag or use SQL-Server
instead of JET because it will be much more easier to code this kind of
thing on it using a stored procedure than with JET/ODBC.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"mscertified" wrote in message
...
Well since multiple users could be pulling from the queue at the same
time,
they could well both be trying to read the same record. It is impossible
for
me to try this since I have only a single logon id.
I was hoping someone could offer guidance or experience.

"Sylvain Lafontaine" wrote:

Excerpt if you have a very strange business case, usually you don't have
to
use such a lock when multiple users are accessing a database from a web
page
and insertions/deletions/updates will be managed correctly by the ODBC
driver. You might have problems if the *same* record is edited by
multiple
users but this is another story.

Try it and see what happens. If this doesn't work, come back here
(preferably by starting a new thread) and show us an example of your data
with an explanation of why it doesn't work.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"mscertified" wrote in message
...
My application will have a table being inserted to via a web page.
The Access database will be in constant use by multiple users.
Periodically, users will need to pull items (read then delete) from the
queue in first-in first-out basis.
My concern is to avoid conflicts between pulling from the queue and
records
being inserted via the web page (via ODBC connection) and also between
different users pulling from the queue simultaneously. I guess I need
some
type of exclusive lock which will force other users to wait and retry.
Has
anyone done anything similar?






  #5  
Old August 13th, 2007, 10:50 AM posted to microsoft.public.access.tablesdbdesign
Jamie Collins
external usenet poster
 
Posts: 1,705
Default Locking for multiple user access ?

On Aug 10, 3:22 pm, mscertified wrote:
My application will have a table being inserted to via a web page.
The Access database will be in constant use by multiple users.
Periodically, users will need to pull items (read then delete) from the
queue in first-in first-out basis.
My concern is to avoid conflicts between pulling from the queue and records
being inserted via the web page (via ODBC connection) and also between
different users pulling from the queue simultaneously. I guess I need some
type of exclusive lock which will force other users to wait and retry. Has
anyone done anything similar?


Not exactly what you are doing but this MSDN article I think covers
the issues:

How To Implement Multiuser Custom Counters in Jet 4.0
http://support.microsoft.com/default.aspx/kb/240317

with the caveat that I don't think a DBMS table is the best way to
implement a queue. Are you using ASP.NET?

Jamie.

--


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.