Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Lock object vith forgien key

Former Member
0 Likes
1,015

HI All,

I have 4 table that are related via forgin key ,i want to create lock object and my question

is if i need to create lock object for each table or just one lock object.

Best Regards

Joy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
957

its simple dear,

the number of table you are updating in one go will form the tables in locking objects

for example in save command you are updating 3 table then you will lock three table

and just readting from master table then you will create a seperate lock for your master table ..

i.e you will put a read lock on your master table and write lock on your child table..

just put read lock on master first if successfull. the place the write lock on the child.

Regards

6 REPLIES 6
Read only

Former Member
0 Likes
957
Read only

0 Likes
957

Hello KArtik ,

i read the help and one thing that i don't understand is if i have different tables that

the forging key is for instance employee .

when i create lock object enqoue and denque the FM that generate is different so how i can

use just one lock object ?

Regards

Joy

Read only

0 Likes
957

I think u are using custom tables..its better to create lock for all tables and update tables and unlock all..

cheers

Read only

0 Likes
957

HI ,

What does it mean ,if the tables are relate via foreign key and i lock one table to update,

does it mean that all the related tables are locked or not ....?

Best Regards

Joy

Edited by: Joy Stpr on Jul 19, 2009 9:02 PM

Read only

0 Likes
957

I dont think related tables will be locked as you are just updating not inserting new record...

Problem might come when u want to insert new record in one of secondary table..

cheers

Read only

Former Member
0 Likes
958

its simple dear,

the number of table you are updating in one go will form the tables in locking objects

for example in save command you are updating 3 table then you will lock three table

and just readting from master table then you will create a seperate lock for your master table ..

i.e you will put a read lock on your master table and write lock on your child table..

just put read lock on master first if successfull. the place the write lock on the child.

Regards