Definitely SET EXCL OFF since it's a multi-user app.
My money is on wOOdy. I honestly think I had asked something like this
years ago but forgot the details.
On 10/23/2020 3:33 PM, Richard Kaye wrote:
Other than the differences in the internals between an xBase function versus
the SQL engine I'm out of guesses. I bet Christof (or Chen) could explain it...
😊
I still don't understand why it's attempting to get a row lock. What about SET
EXCLUSIVE?
--
rk
-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of MB Software
Solutions, LLC
Sent: Friday, October 23, 2020 3:24 PM
To: profoxt...@leafe.com
Subject: Re: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works
with no issue. Why?
The WHERE clause was something to count but I don't think it was optimizable
because no index based on it. (Vague recollection; not 100%
sure.)
SET MULTILOCKS is ON.
On 10/22/2020 3:36 PM, Richard Kaye wrote:
True. My next guess is it's using the index because your WHERE clause is
Rushmore optimized. So it still doesn't need to move the record pointer in the
source table. And I'll return to how your environment is setup. I'd have to go
read the fine docs to understand why moving the record pointer is also trying
to lock the row. Do you have SET MULTILOCKS ON?
--
rk
-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Richard
Kaye
Sent: Thursday, October 22, 2020 3:28 PM
To: profoxt...@leafe.com
Subject: RE: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works
with no issue. Why?
Leaving aside the environment stuff like SET EXCLUSIVE and SET MULTILOCKS, my
first guess is COUNT FOR actually moves the record pointer through every row
in the table, Whereas SELECT COUNT() is reading the header.
--
rk
-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of MB
Software Solutions, LLC
Sent: Thursday, October 22, 2020 3:24 PM
To: profoxt...@leafe.com
Subject: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works
with no issue. Why?
VFP9SP3
Why would a COUNT FOR hang ("Attempting to lock") whereas my easy workaround is SELECT
COUNT(*) FROM SomeCursor WHERE <<yada yada yada>> ??
tia,
--Mike
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/6667f1fd-0315-aa32-4545-109f496f7...@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.