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-bounces@leafe.com On Behalf Of MB Software Solutions, LLC Sent: Thursday, October 22, 2020 3:24 PM To: profoxtech@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