473,396 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Multi user design gaffe

RG
Wondering if anyone can suggest a solution to my dilemma. (VB6, ADO,
Access 200).

The situation: Because I had pre-existing data inquiry modules that
relied on database records, as well as a complex central data entry
form that uses a recordset with a number of underlying tables, I
decided to implement the form's cancel function via transaction
rollback. Probably not a great idea, but it worked well. Until of
course the client decided he wanted to expand to a multi-user setup.

I can't use optimistic locking because of the transaction context, and
record-level pessimistic locking is very problematic because of
contention for the many related tables.

I've implemented my own lock table based on the central table's unique
id, but don't seem to be able to tell the Jet engine NOT to lock the
records fetched. Are there any obvious solutions other than a fairly
complete overhaul?

Jan 29 '06 #1
4 1459
> form that uses a recordset with a number of underlying tables
don't seem to be able to tell the Jet engine NOT to lock the
records fetched.
Use a make table query to create a local table matching the recordset.

Use the local table instead of the recordset.

Just use the original query to load the local table,
and update back from the local table to the multi-user tables.

One extra local table, and a couple of lines of extra code
where selecting and saving the records.

(david)
"RG" <rg*****@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com... Wondering if anyone can suggest a solution to my dilemma. (VB6, ADO,
Access 200).

The situation: Because I had pre-existing data inquiry modules that
relied on database records, as well as a complex central data entry
form that uses a recordset with a number of underlying tables, I
decided to implement the form's cancel function via transaction
rollback. Probably not a great idea, but it worked well. Until of
course the client decided he wanted to expand to a multi-user setup.

I can't use optimistic locking because of the transaction context, and
record-level pessimistic locking is very problematic because of
contention for the many related tables.

I've implemented my own lock table based on the central table's unique
id, but don't seem to be able to tell the Jet engine NOT to lock the
records fetched. Are there any obvious solutions other than a fairly
complete overhaul?

Jan 31 '06 #2
RG
David, thanks for the advice. It suggests I can (indeed, have to) get
rid of the transaction calls and implement optimistic locking, with or
without maintaining the existing custom locking. Does that seem right
to you?

Jan 31 '06 #3
I'm not sure exactly what you have in place, except that the
transaction was locking all the related data tables, which
is a problem in a multi-user environment.

I thought that you might be able to leave the transactions in
place, but they would be against your local temp table.

Then after all the processing, you could update from your
local temp table to your shared table.

Using your custom locking to lock the actual target table.

Hopefully without much change at all. to your existing code.

If you can't do it without a major rewrite, then I guess you
should look for a 'best' solution rather than an 'easiest' solution

(david)
"RG" <rg*****@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
David, thanks for the advice. It suggests I can (indeed, have to) get
rid of the transaction calls and implement optimistic locking, with or
without maintaining the existing custom locking. Does that seem right
to you?

Jan 31 '06 #4
RG
Actually, you're right again - I wasn't thinking about applying the
transactions to a new connection for the local table, but that will
allow me to keep most of the existing code in place. Many thanks.

Feb 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Neil Zanella | last post by:
Hello, I would be very interested in knowing how the following C++ multi-instance singleton (AKA Borg) design pattern based code snippet can be neatly coded in Python. While there may be...
10
by: Deano | last post by:
Hi, I feel I have a good learning opportunity here. I have been asked to knock up a simple db for managing lettings of rooms and halls. I'm confident about the design but want to make it...
2
by: George Durzi | last post by:
This is more of a design/philosophical question :) I have a page in which the user sets attributes for a project. There are 8 attributes, e.g. Project Type, Country, etc. The number of options...
17
by: Aussie Rules | last post by:
Hi, I want to have a single line combo box dropdown, but where i can selected multiple items in the drop down via a check box... I can see one in the standard tool box... is there one ? If...
5
by: bobwansink | last post by:
Hi, I'm relatively new to programming and I would like to create a C++ multi user program. It's for a project for school. This means I will have to write a paper about the theory too. Does anyone...
23
by: Kaz Kylheku | last post by:
I've been reading the recent cross-posted flamewar, and read Guido's article where he posits that embedding multi-line lambdas in expressions is an unsolvable puzzle. So for the last 15 minutes...
45
by: Luvin lunch | last post by:
Hi, I'm new to Access and have been asked to develop a simple Access system to replace one that already exists. There are five users of the current Access system and each of the users works off...
7
by: Jon Davis | last post by:
I have a couple questions. First of all, would anyone consider a multi-layered programming approach (building business objects that are seperate from data access logic and seperate from user...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.