summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/FConnection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/firebird/FConnection.cxx')
-rw-r--r--connectivity/source/drivers/firebird/FConnection.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/connectivity/source/drivers/firebird/FConnection.cxx b/connectivity/source/drivers/firebird/FConnection.cxx
index 4f98cd1cfb36..71bcb3f95cab 100644
--- a/connectivity/source/drivers/firebird/FConnection.cxx
+++ b/connectivity/source/drivers/firebird/FConnection.cxx
@@ -107,14 +107,11 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
// some example code how to get the information out of the sequence
ISC_STATUS_ARRAY status; /* status vector */
- isc_db_handle db = NULL; /* database handle */
- if (isc_attach_database(status, 0, "/home/javi/Firebird/test/new.fdb", &db, 0, NULL))
+ if (isc_attach_database(status, 0, "/home/javi/Firebird/test/new.fdb", &m_DBHandler, 0, NULL))
if (pr_error(status, "attach database"))
return;
- m_DBHandler = db;
-
osl_atomic_decrement( &m_refCount );
}
// XServiceInfo
@@ -398,6 +395,11 @@ void OConnection::disposing()
m_bClosed = sal_True;
m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>();
+ ISC_STATUS_ARRAY status; /* status vector */
+ if (isc_detach_database(status, &m_DBHandler))
+ if (pr_error(status, "dattach database"))
+ return;
+
dispose_ChildImpl();
OConnection_BASE::disposing();
}