summaryrefslogtreecommitdiff
path: root/wizards/source/access2base/Database.xba
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2018-07-29 12:22:17 +0200
committerJean-Pierre Ledure <jp@ledure.be>2018-07-29 12:22:17 +0200
commit7a7eb2c270d598cb15ce38cefceeecba149fe467 (patch)
tree269d1aae4db086447f074116cf37302931c6ed4a /wizards/source/access2base/Database.xba
parente593b623dad9456d3452c4c537479596bcd0b00b (diff)
Access2Base - FIX: flush external connections
Connections opened with DoCmd.OpenDatabase were not flushed when closed explicitly. Risk of data loss.
Diffstat (limited to 'wizards/source/access2base/Database.xba')
-rw-r--r--wizards/source/access2base/Database.xba7
1 files changed, 5 insertions, 2 deletions
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba
index 3bd3bced482b..2a61d7e3c73a 100644
--- a/wizards/source/access2base/Database.xba
+++ b/wizards/source/access2base/Database.xba
@@ -227,8 +227,11 @@ Const cstThisSub = &quot;Database.Close&quot;
mClose = False
If _DbConnect &lt;&gt; DBCONNECTANY Then Goto Error_NotApplicable
- Connection.close()
- Connection.dispose()
+ With Connection
+ .flush
+ .close()
+ .dispose()
+ End With
Set Connection = Nothing
mClose = True