Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
Another .lck files question... |
Fri, Feb 15 2008 9:07 AM | Permanent Link |
Mark Wilsdorf | Hi,
A problem I'm having with .lck files is not being able to delete them when I believe I should be able to. My application keeps separate "company-related" tables in separate folders. If a company is open in my app, the user can close the company (closes all tables in that company's folder), then use a command to delete the company if he wishes. This command simply deletes all tables in that company's folder, then attempts to delete the folder. Problem is, it seems dbisam still maintains a lock on the dbisam.lck file, meaning my app cannot delete it nor the company's folder. My question: after all the tables in folder are closed, when would DBISAM release the dbisam.lck file? Also, is there a method call, etc., that would cause DBISAM to release dbisam.lck in a folder? |
Fri, Feb 15 2008 9:11 AM | Permanent Link |
"Jose Eduardo Helminsky" | Mark
Just closing the tables is not enough to stop the DBISAM engine. If you really want to delete the .lck file then you should stop the engine Engine.Active := False and then you can delete the .lck file. Eduardo |
Fri, Feb 15 2008 12:22 PM | Permanent Link |
Arnd Baranowski | Mark,
the key ist to close the session. Then you will be able to delete the ..lck file. Arnd Mark Wilsdorf wrote: > Hi, > > A problem I'm having with .lck files is not being able to delete them when I believe I > should be able to. > > My application keeps separate "company-related" tables in separate folders. If a company > is open in my app, the user can close the company (closes all tables in that company's > folder), then use a command to delete the company if he wishes. This command simply > deletes all tables in that company's folder, then attempts to delete the folder. > > Problem is, it seems dbisam still maintains a lock on the dbisam.lck file, meaning my app > cannot delete it nor the company's folder. > > My question: after all the tables in folder are closed, when would DBISAM release the > dbisam.lck file? Also, is there a method call, etc., that would cause DBISAM to release > dbisam.lck in a folder? > > |
Fri, Feb 15 2008 3:51 PM | Permanent Link |
Mark Wilsdorf | Eduardo & Arnd...
Thanks, I'll experiment a bit. Mark Wilsdorf |
Fri, Feb 15 2008 4:29 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Arnd,
<< the key ist to close the session. Then you will be able to delete the ..lck file. >> Close - the actual key is to close any TDBISAMDatabase objects that use the physical database directory. The issue that is tricky, however, is any temporary TDBISAMDatabase objects that are created when you use a TDBISAMQuery or TDBISAMTable with a hard-coded path name in the DatabaseName property. By default, those types of temporary database objects are kept around until the session is closed, but you can control this behavior with this property: http://www.elevatesoft.com/scripts/manual.dll?action=mancompprop&id=dbisam4&product=d&version=7&comp=TDBISAMSession&prop=KeepConnections So, in the instance where the KeepConnections property is True (the default) and you have temporary database objects, then yes, you are 100% correct - the only way to close them is to close the session. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |