Table lock coexistence

<< Click to Display Table of Contents >>

Navigation:  Application development > Locking >

Table lock coexistence

Previous pageReturn to chapter overviewNext page

Each type of table-level lock placed on a table affects to some degree the access that other users have to the table. You can use a lock aggressively to prohibit other users from accessing a table, or you can use a lock defensively to prevent other users from placing locks that would limit your application's access to the table. The chart below shows the results of User 2's attempts to place table locks after User 1 has successfully placed each type of lock:


User 2:
Attempts to open the table in exclusive mode

 
Attempts to acquire a write lock

 
Attempts to acquire a read lock

 
Attempts to open the table in share mode

User 1:
Opens the table in exclusive mode

Fail

Fail

Fail

Fail

Acquires a write lock

Fail

Fail

Fail

Succeed

Acquires a read lock

Fail

Fail

Succeeds for Paradox; Fails for dBASE or FoxPro

Succeed

Opens the table in share mode

Fail

Succeed

Succeed

Succeed

 

hmtoggle_plus1Locking topics