473,405 Members | 2,171 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,405 software developers and data experts.

Weird record level locking with a self join

I have an Employees table with the following fields:

EmployeeID SupervisorID
Fred Bob
Bob
John Bob
Mary Bill
Bill

I have created a self join in the relationships window, with
referential integrity and cascading updates set. My database settings
are as follows:

Default record locking: "no locks"
Open db using record level locking: checked

If I Change "Bob" to "Bobby" in the EmployeeID column I get the
following error:
"Could not update; currently locked. (Error 3218)"

If I perform the same action with record level locking unchecked, the
change "Bobby" propagates, as expected, to the SupervisorID column:

EmployeeID SupervisorID
Fred Bobby
Bobby
John Bobby
Mary Bill
Bill
If I set Default record locking to "Edited Record" the above behaviour
is the same.

I simply can't get my head round this; I would have expected the
opposite of what is happening. So my understanding is of the above
behaviour is:

If I select record level locking I can not edit the current record.
If I select page level locking I can!! Huh!?! Surely the current
record is part of the page!

I just want to create a self join and cascade updates from EmployeeID
to SupervisorID. But I also want to understand what is happening
above.

Paul
Mar 18 '08 #1
1 2209
On Tue, 18 Mar 2008 10:25:48 -0700 (PDT), Paul H
<go****@comcraft.freeserve.co.ukwrote:

I'm going to avoid the real issue: Your EmployeeID and SupervisorID
fields should be numeric - Long Integer, and no cascade update is
needed. Names like "Bob" should go in a FirstName field.

-Tom.

>I have an Employees table with the following fields:

EmployeeID SupervisorID
Fred Bob
Bob
John Bob
Mary Bill
Bill

I have created a self join in the relationships window, with
referential integrity and cascading updates set. My database settings
are as follows:

Default record locking: "no locks"
Open db using record level locking: checked

If I Change "Bob" to "Bobby" in the EmployeeID column I get the
following error:
"Could not update; currently locked. (Error 3218)"

If I perform the same action with record level locking unchecked, the
change "Bobby" propagates, as expected, to the SupervisorID column:

EmployeeID SupervisorID
Fred Bobby
Bobby
John Bobby
Mary Bill
Bill
If I set Default record locking to "Edited Record" the above behaviour
is the same.

I simply can't get my head round this; I would have expected the
opposite of what is happening. So my understanding is of the above
behaviour is:

If I select record level locking I can not edit the current record.
If I select page level locking I can!! Huh!?! Surely the current
record is part of the page!

I just want to create a self join and cascade updates from EmployeeID
to SupervisorID. But I also want to understand what is happening
above.

Paul
Mar 19 '08 #2

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

Similar topics

3
by: redneck_kiwi | last post by:
Hi all: I have a really weird problem. I am developing a customer catalog system for my company and as such have delved into sessions for authentication and access levels. So far, I have managed...
1
by: Fardude | last post by:
ACCESS 97, Pessimistic Record Locking!??? Does Access 97 allow record level Pessimistic locking? In other words, when user A is editing a record (has it locked) and User B tries to edit it...
2
by: Deano | last post by:
I use the Access 2000 MSI Wizard from Sagekey and they don't know if the bug documented on page 32 of the Access 2000 Developer`s Handbook Volume 2: Enterprise Edition still affects the runtime. ...
1
by: jv | last post by:
Hello, I'm using A2K and am trying to make sure that my program only locks one record at a time and I don't seem to have any luck getting that to happen. In the database options, I've selected...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
9
by: master | last post by:
Actually, it is not only the record locking, what I need, and nobody seems to descibe this. Imagine the following scenario. There is a database with, say 10000 records with some unvalidated...
0
by: Cindy Huyser | last post by:
I have an Access 2000 database behind a threaded Java application that that can have have concurrent access to the same table (but not the same record). The database is set up for shared access...
3
by: paulus4605 | last post by:
dears since I'm new to ruby I try to create a form within ruby on rails. this is my controller require "player" class SpelersController < ApplicationController def index @speler =...
19
by: emanning | last post by:
Using Access 2003 and using a form that's mostly bound. I need a way to tell if user-1 is on the record when user-2 tries to open the same record, w/o waiting for the user-1 to save the record...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.