Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Reported for Version 2.36 » View Incident Report |
Serious |
Reported By: Wilko Frenzel [Aagon GmbH] Reported On: 10/24/2022 For: Version 2.36 Build 1 |
//To repro please create an empty VCL application and drop a TEDBEngine, TEDBSession, TEDBDatabase and a TButton onto the form. //Into the ButtonClick event put the following code: const TempDir = '.\SomeTempDir'; TableDir = TempDir + '\DBTables'; var LTableDir: string; begin EDBEngine1.ConfigPath := TempDir; EDBEngine1.BufferedFileIO := True; with EDBEngine1.BufferedFileIOSettings do begin Add('*.*,1,1,0,False'); Add('*.EDBTbl,4,8,1,False'); end; ForceDirectories(TableDir); EDBSession1.SessionName := 'SomeSessionName'; EDBSession1.LoginUser := 'Administrator'; EDBSession1.LoginPassword := 'EDBDefault'; EDBSession1.KeepConnections := False; EDBDatabase1 := TEDBDatabase.Create(nil); EDBDatabase1.SessionName := EDBSession1.SessionName; EDBDatabase1.Database := 'SomeDatabaseName'; EDBDatabase1.DatabaseName := EDBDatabase1.Database; EDBDatabase1.KeepConnection := False; LTableDir := TPath.Combine(ExtractFileDir(ParamStr(0)), TableDir); EDBDatabase1.Session.Execute('CREATE DATABASE "' + EDBDatabase1.DatabaseName + '"' + sLineBreak + 'PATH ' + QuotedStr(LTableDir) + sLineBreak); EDBDatabase1.Open; EDBDatabase1.Execute('CREATE TABLE SomeTable (SomeId GUID)'); EDBDatabase1.CloseDataSets; EDBDatabase1.Close; EDBDatabase1.Session.Execute('DROP DATABASE "' + EDBDatabase1.DatabaseName + '"'); // at this point if you look into .\SomeTempDir\DBTables there still exists // the EDBDatabase.EDBCat.Old and its being opened by the application // that means the following will fail (return false) // with EDBEngine1.BufferedFileIO := False the file is also there but not open anymore so the recursive delete succeeds TDirectory.Delete(TableDir, True); end;
This web page was last updated on Wednesday, March 20, 2024 at 07:22 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |