Locking tables - session locks

3 views
Skip to first unread message

Kevin Zawicki

unread,
Jul 15, 2026, 1:00:07 PM (10 days ago) Jul 15
to TheDBCommunity

Locking tables

I need to delete rows from multiple tables.

Key value in most tables is one-to-one, but in some tables one-many.

No RI. (ever)

I usually use tcursors or cascading queries.

With a tcursor I open one for each table and verify a record lock.

But for the tables that have multiple rows I sometimes attempt a table write lock.

Looking at the LOCK method

 

lock ( const lockType String ) Logical

tbl.lock(“Write”)

 

 

I was looking at the session lock.

 

lock ( const table { Table|TCursor|String },  const lockType String [ , const table { Table|TCursor| String },  const lockType String ] * ) Logical

 

It does not seem to work? I am thinking specifying no session means the current session?

 

But

A Session object represents a channel to the database engine. When you start a Paradox application one session opens by default. You can use ObjectPAL to open additional sessions from within an application. Only the default session can be managed using Paradox interactively. You must manage other sessions using ObjectPAL.

 

When running scripts interactively are you not in the current session?

 

I write lock three table using session lock and get a true return.

But then I can interactively edit rows in those tables. Is that because I am in same “session”?

 

How do you handle multiple table edits?

 

 

 

 

 

Reply all
Reply to author
Forward
0 new messages