Access2Base - Fix flush method when closing database

The "flush" method is not always present in
   com.sun.star.sdbc.drivers.OConnectionWrapper or
   com.sun.star.sdbc.XConnection
objects.
=> Test presence before executing Connection.flush

Change-Id: I5ab4968ba6fdd0e23352e0cfe18907260c46b7b0
This commit is contained in:
Jean-Pierre Ledure 2018-08-25 15:03:04 +02:00
parent 6ae4c85fe6
commit f903dd5e21

View file

@ -228,7 +228,7 @@ Const cstThisSub = "Database.Close"
If _DbConnect <> DBCONNECTANY Then Goto Error_NotApplicable
With Connection
.flush
If Utils.hasUNOMethod(Connection, "flush") Then .flush
.close()
.dispose()
End With