diff options
Diffstat (limited to 'connectivity/source/drivers/odbc/ORealDriver.cxx')
-rw-r--r-- | connectivity/source/drivers/odbc/ORealDriver.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx index 4e541d4e67d7..99b6dc4978d6 100644 --- a/connectivity/source/drivers/odbc/ORealDriver.cxx +++ b/connectivity/source/drivers/odbc/ORealDriver.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -329,7 +330,7 @@ oslGenericFunction ORealObdcDriver::getOdbcFunction(sal_Int32 _nIndex) const pFunction = (oslGenericFunction)pODBC3SQLNativeSql; break; default: - OSL_ENSURE(0,"Function unknown!"); + OSL_FAIL("Function unknown!"); } return pFunction; } @@ -340,20 +341,20 @@ oslGenericFunction ORealObdcDriver::getOdbcFunction(sal_Int32 _nIndex) const return *(new ORealObdcDriver(_rxFactory)); } // ----------------------------------------------------------------------------- -// ODBC Environment (gemeinsam fuer alle Connections): +// ODBC Environment (common for all Connections): SQLHANDLE ORealObdcDriver::EnvironmentHandle(::rtl::OUString &_rPath) { - // Ist (fuer diese Instanz) bereits ein Environment erzeugt worden? + // Is (for this instance) already a Enviroment made? if (!m_pDriverHandle) { SQLHANDLE h = SQL_NULL_HANDLE; - // Environment allozieren + // allocate Environment - // ODBC-DLL jetzt laden: + // load ODBC-DLL now: if (!LoadLibrary_ODBC3(_rPath) || N3SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&h) != SQL_SUCCESS) return SQL_NULL_HANDLE; - // In globaler Struktur merken ... + // Save in global Structure m_pDriverHandle = h; SQLRETURN nError = N3SQLSetEnvAttr(h, SQL_ATTR_ODBC_VERSION,(SQLPOINTER) SQL_OV_ODBC3, SQL_IS_UINTEGER); OSL_UNUSED( nError ); @@ -367,3 +368,4 @@ SQLHANDLE ORealObdcDriver::EnvironmentHandle(::rtl::OUString &_rPath) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |