Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
How can I delete a lck file? |
Thu, Dec 7 2006 1:05 AM | Permanent Link |
Marilyn Fleming | Here is the situation: Our app allows user to create a database. He may discover that he did it wrong, and immediately need to delete it. He does not need to shut down tha app. Code does
this with Deltree of the database directory. I created tables, and made sure they were closed. But deltree won't work because the lck file is still "in use". Everything else in the directory can be deleted without closing the application EXCEPT the lck file -- I removed the files manually, one at a time, while the app was running. But the lck file is still "in use", despite the fact that none of the tables are in use, or even present. Why is the lck still locked? Is there any way I can unlock it? If I can't get around this, I may have to abandon dbisam 4 altogether. |
Thu, Dec 7 2006 4:13 AM | Permanent Link |
"Jose Eduardo Helminsky" | Marylin
You have to deactivate the Engine and then delete the dbisam.lck file. Not tested Eduardo |
Thu, Dec 7 2006 4:15 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Marilyn,
<< Why is the lck still locked? >> It's not locked, it's simply open. You need to close any open TDBISAMDatabase components in order to close the lock file. As long as there is an open TDBISAMDatabase component that is referencing that physical directory, the lock file will stay open. -- Tim Young Elevate Software www.elevatesoft.com |
Sun, Dec 10 2006 11:22 AM | Permanent Link |
Marilyn Fleming | Marilyn Fleming <marilyn.fleming@verizon.net> wrote:
Here is the situation: Our app allows user to create a database. He may discover that he did it wrong, and immediately need to delete it. He does not need to shut down tha app. Code does this with Deltree of the database directory. I created tables, and made sure they were closed. But deltree won't work because the lck file is still "in use". Everything else in the directory can be deleted without closing the application EXCEPT the lck file -- I removed the files manually, one at a time, while the app was running. But the lck file is still "in use", despite the fact that none of the tables are in use, or even present. For the record, I found the solution -- set Session.KeepConnections=False. Then when all the tables are closed the db is not connected, so the lck file is not locked. (I'm not using Client- Server, so KeepConnections=False is no problem.) |
Mon, Dec 11 2006 2:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Marilyn,
<< For the record, I found the solution -- set Session.KeepConnections=False. Then when all the tables are closed the db is not connected, so the lck file is not locked. (I'm not using Client- Server, so KeepConnections=False is no problem.) >> That was going to be my next question if you stated that you weren't using an explicit TDBISAMDatabase component. In such a case, the session will create temporary TDBISAMDatabase components "behind the scenes", and the TDBISAMSession.KeepConnections property controls when these are closed when the tables that need them are closed. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, April 17, 2024 at 08:53 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |