Re: Need Locking Edification
Posted in 1997
> Collins, Mark wrote: > >> What puzzles me is that we are not deleting by the field that has > an > >> index (authcode). So what key value exactly is the error message > >> referring to that is locked??? > > No, but you are deleting rows that have a value for authcode (even if > that value is 'null'). When a row is deleted, regardless of the > method > used to select the row, any and all indexes associated with that table > > must have any references to that row removed. > Thanks for all replies. As I suspected, the page locking was the problem. Once we changed to row level, inserts were no longer blocked. Although I'm still not totally clear on why a delete which locks a key index would block inserts. I need to try to clarify in my mind the above reply: Say my key value is "AAA". We are deleting rows where date = "8/11/97", and there are several rows with this date with a key field value of "AAA". Does the delete lock ALL rows which have a key value of "AAA" or just those with that key value AND the date "8/11/97"? It doesn't seem to make sense to lock all the "AAA" rows when they do not all have the "8/11/97" date. But I'm not sure how this key locking mechanism works. Still not exactly sure WHICH key is being locked. Is it locking the "AAA" index keys or the ROWID, or both? In other words, if we have rows with key fields of "AAA" and some with dates of "8/11" and also "8/13", how does Online differentiate which rows to lock? Thanks again. -- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ADDRESS ALTERED TO FOIL SPAMMERS: Remove "*NO-SPAM*" to reply. Cosmo Lee Multi-User Computer Systems Brooklyn, NY "JUST SAY 'NO' TO SPAM" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *