I use delphi 6 SP2,Oracle 8.1.7,DOA 3.4.6.1,Win2000
M: Master Table (EPIC_SYS_USER_GROUP)
D: Detail Table (EPIC_SYS_USER_R_ROLES)
D.GRP_ID is related with M.ID
Detail table has relation to master table in Oracle (via Foreign Key). I use D in lmCheckImmediate locking mode. When I update a record (M.ID=2 for instance) in M and then try to update a record in D (D.GRP_ID=2 with relation to M.ID) there is no problem. If I change locking mode of D to lmLockImmediate and try to update M and then D repectively I get a message like "record is deleted by another user".
Oracle Monitor output is as follows:
[at lockimmediate mode]
SELECT T.ROWID,T.* FROM EPIC_SYS_USER_R_ROLES T
where (T.GRP_ID=:GRP_ID)
and
(T.rowid = :doa__rowid)
for update of T.ID nowait
:GRP_ID = 1 (should be 2, 1 is the first record but we are editing record 2)
[at checkimmediate mode]
SELECT T.ROWID,T.* FROM EPIC_SYS_USER_R_ROLES T
where (T.GRP_ID=:GRP_ID)
and
(T.rowid = :doa__rowid)
:GRP_ID = 1 (should be 2 again,but no problem occurs since there is no 'for update' statement in SQL)
After updating M if we refresh D and update it no problem occurs (GRP_ID variable is set to 2 which is the correct group id).
------------------
[This message has been edited by manas (edited 25 March 2002).]
M: Master Table (EPIC_SYS_USER_GROUP)
D: Detail Table (EPIC_SYS_USER_R_ROLES)
D.GRP_ID is related with M.ID
Detail table has relation to master table in Oracle (via Foreign Key). I use D in lmCheckImmediate locking mode. When I update a record (M.ID=2 for instance) in M and then try to update a record in D (D.GRP_ID=2 with relation to M.ID) there is no problem. If I change locking mode of D to lmLockImmediate and try to update M and then D repectively I get a message like "record is deleted by another user".
Oracle Monitor output is as follows:
[at lockimmediate mode]
SELECT T.ROWID,T.* FROM EPIC_SYS_USER_R_ROLES T
where (T.GRP_ID=:GRP_ID)
and
(T.rowid = :doa__rowid)
for update of T.ID nowait
:GRP_ID = 1 (should be 2, 1 is the first record but we are editing record 2)
[at checkimmediate mode]
SELECT T.ROWID,T.* FROM EPIC_SYS_USER_R_ROLES T
where (T.GRP_ID=:GRP_ID)
and
(T.rowid = :doa__rowid)
:GRP_ID = 1 (should be 2 again,but no problem occurs since there is no 'for update' statement in SQL)
After updating M if we refresh D and update it no problem occurs (GRP_ID variable is set to 2 which is the correct group id).
------------------
[This message has been edited by manas (edited 25 March 2002).]