Re: AW: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works with no issue. Why?

2020-10-23 Thread MB Software Solutions, LLC
Thanks, wOOdy! On 10/23/2020 4:08 PM, Jürgen Wondzinski wrote: COUNT does indeed a Filelock, which has the effect that the result doesn't get changed in between the time it needs to traverse the table. Thus if someone is just editing a record and altering your FOR field: what should COUNT

Re: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works with no issue. Why?

2020-10-23 Thread MB Software Solutions, LLC
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

AW: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works with no issue. Why?

2020-10-23 Thread Jürgen Wondzinski
COUNT does indeed a Filelock, which has the effect that the result doesn't get changed in between the time it needs to traverse the table. Thus if someone is just editing a record and altering your FOR field: what should COUNT (or CALC or SUM etc) take into account? That's why it's waiting

RE: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works with no issue. Why?

2020-10-23 Thread Richard Kaye
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:

Re: COUNT FOR hangs on record locking, but SQL - SELECT COUNT(*) works with no issue. Why?

2020-10-23 Thread MB Software Solutions, LLC
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