MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2013

Re: Uniquely identifying a record in SQL without a unique key?



fixed

Might be interesting to do a DSPRCDLCK on the file.

I'm guessing that each time you make a data change a new ODP is being created, hence the SHRRD locks. (And it might be something to so with the way SQuirreL is coded.)

I believe that you can have only one record at a time locked in a file. If you ask SQL to do more than that, needed for cursor stability and the like, I think it will put a *EXCLRD or *EXCL lock on the file. Don't know if SQuirreL gives that capability.

Sam

On 1/2/2013 7:51 PM, James Lampert wrote:
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?





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

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact