This morning, I wrote:

> Suppose we have a result set of the entire file, with scrollable
> update cursor. When are records actually locked, and is there a way
> to avoid locking them unless we know we're going to update them?

Now THIS is interesting:

I just went into one of our demonstration files using Squirrel SQL. I then did a WRKOBJLCK on the file, from a terminal session, and found no locks whatsoever on the file or the member, even though Squirrel was displaying the entire file.

Then I right-clicked on the file in Squirrel, and selected "Make Editable."

At that point, a SHRRD lock appeared on the file. And when I made a data change, another SHRRD lock appeared, with a third SHRRD lock appearing when I changed something else.

At no time, though, did I see any record locks.

This is getting interesting: just how do record locks work in SQL?


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page