diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-24 19:23:15 +0200 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-24 20:36:00 +0200 |
commit | dc318a35680e799ef5b728c9ff1ae0203edf0c72 (patch) | |
tree | cf35f01e4e3ac92a6a5c694991cf1677747d5a75 /connectivity | |
parent | f583a199b3a0812523ed75e1d2099325edad24f7 (diff) |
Define SQL dialect driver-wide and change to 3. (firebird-sdbc)
Previously the driver used firebird sql dialect = 1 (IB 5.5 or earlier)
however we need support for delimited identifiers, DATE, TIME, TIMESTAMP
etc. which are all available from IB6 onwards ie. sql dialect 3. Currently
this is the latest dialect supported by firebird.
Change-Id: Ia2302bf69bda877d81f8995843cce6c606e7ed43
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/FDriver.hxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/firebird/FStatement.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/drivers/firebird/StatementCommonBase.cxx | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/FDriver.hxx b/connectivity/source/drivers/firebird/FDriver.hxx index e5752e28470a..ac5366248148 100644 --- a/connectivity/source/drivers/firebird/FDriver.hxx +++ b/connectivity/source/drivers/firebird/FDriver.hxx @@ -45,6 +45,11 @@ namespace connectivity { namespace firebird { + // The SQL dialect in use + // Has to be used in various isc_* calls. + // 3: Is IB6 -- minimum required for delimited identifiers. + static const int FIREBIRD_SQL_DIALECT = 3; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL FirebirdDriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ); typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::sdbc::XDriver, diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx index 0469c6c61f05..9f4a58c24754 100644 --- a/connectivity/source/drivers/firebird/FStatement.cxx +++ b/connectivity/source/drivers/firebird/FStatement.cxx @@ -33,6 +33,7 @@ * *************************************************************************/ +#include "FDriver.hxx" #include "FStatement.hxx" #include "FConnection.hxx" #include "FResultSet.hxx" @@ -108,7 +109,7 @@ sal_Int32 SAL_CALL OStatement::executeUpdate(const OUString& sqlIn) &m_pConnection->getTransaction(), 0, OUStringToOString(sql, RTL_TEXTENCODING_UTF8).getStr(), - 1, + FIREBIRD_SQL_DIALECT, NULL); if (aErr) diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx index 4f99d5b45242..fe6c6a2c6c88 100644 --- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx +++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx @@ -33,6 +33,7 @@ * *************************************************************************/ +#include "FDriver.hxx" #include "FResultSet.hxx" #include "StatementCommonBase.hxx" #include "Util.hxx" @@ -164,7 +165,7 @@ int OStatementCommonBase::prepareAndDescribeStatement(const OUString& sqlIn, &aStatementHandle, 0, OUStringToOString(sql, RTL_TEXTENCODING_UTF8).getStr(), - 1, + FIREBIRD_SQL_DIALECT, pInSqlda); } |