Record Locking

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
clp1000
Posts: 14
Joined: Wed Jan 04, 2023 2:18 am

Record Locking

#1 Post 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

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Record Locking

#2 Post 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)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Record Locking

#3 Post by Tom »

Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

clp1000
Posts: 14
Joined: Wed Jan 04, 2023 2:18 am

Re: Record Locking

#4 Post 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

Post Reply