Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 11 to 14 of 14 total |
D3.3 ForceClose? |
Thu, Jan 21 2010 5:54 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | << Ok, I found Typed operators option, I disable this, and I can compile the source. >> You can find the compilation options for DBISAM here, for future reference: http://www.elevatesoft.com/manual?action=mantopic&id=dbisam4&product=d&version=7&category=2&topic=12 << Possible the problem with DBISAMTable that first you do the "Destroying", and After the Close. In DB.Pas you can see that before close not running on destroy!!! if not (csDestroying in ComponentState) then DoBeforeClose; //// THIS IS SetState(dsInactive); CloseCursor; if not (csDestroying in ComponentState) then DoAfterClose; //// AND THIS This causing that the Table Bef/Aft. Close not handled. >> Yep, you're right - Borland coded it so that these events aren't called during a Free. The workaround would be to implement this in a descendant component's .Destroy method that overrides the base Destroy methods and calls Close *before* calling the inherited Destroy method. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Jan 22 2010 4:22 AM | Permanent Link |
"Eduardo [HPro]" | Tim
I would add the following code: destructor TMyDBISamTable.Destroy(Sender: TObject); begin Close; try if (UpperCase(DataBaseName) = 'MEMORY') and Exists then begin DeleteTable; end; except end; inherited; end; Eduardo |
Fri, Jan 22 2010 6:15 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Eduardo,
<< I would add the following code: >> Maybe for your implementation, but I wouldn't want it in every case since it would prevent someone from using an in-memory table across several opens/closes like a regular table. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jan 25 2010 4:22 AM | Permanent Link |
"Eduardo [HPro]" | Tim
I understand your point. Like you said, maybe in my code because I only use memory tables for each form. Eduardo |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |