Page 1 of 1

Record Locking

Posted: Wed Jan 04, 2023 2:23 am
by clp1000
Hello
When I run my EXE from my c: drive, it opens a shared database from the server ( m: ) When this database is closed using DBcloseall(), it's not being released and is still locked
This has started recently, I think after a windows update on the 17th Oct 2022. It works fine if it's opened directly from the m: drive. It also works correctly on an older PC using Windows 7. The only way to release the database is to reboot my PC. I only use this method ( c: - m: ) for testing porposes and I have been doing the same thing for over 10 years
I'm using Windows 10. Has anybody else had anything similar? Any clues ?
Thanks
Chris

Re: Record Locking

Posted: Wed Jan 04, 2023 2:57 am
by Tom
Hi, Chris.

Sometimes, DbCloseAll() doesn't close all tables. That mainly happens if relations or other references from one table into another (complex filters) are still active. The best idea is to traverse the WorkSpaceList(), release all relations and filters first and close all tables afterwards, maybe even in a loop. I remember someone posted the code for that here in the forum. Maybe that was me. I'm not sure. 8)

Re: Record Locking

Posted: Wed Jan 04, 2023 4:13 am
by Tom

Re: Record Locking

Posted: Thu Jan 05, 2023 2:35 am
by clp1000
Thanks very much for the reply, I'll use this code anyway as I'm sure it will eliminate any DBcloseall() issues

However, the file(s) still aren't being released after they've been closed
I think this must be an issue with my PC, or the latest .NET Framework windows update ?
Very frustrating ....

Thanks again
Chris