diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-09-18 21:02:19 +0100 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-09-18 21:03:03 +0100 |
commit | dba4e216c9d866699204af121f575829e64768d1 (patch) | |
tree | 9353e531fa25003e7b0eee12dbee3b54ecdf5edb /connectivity | |
parent | 936cce1110233504307c9e95baafd1fe67d0fab1 (diff) |
Remove null indicator for type checking. (firebird-sdbc)
Change-Id: I3f693f5662f3022323c7ec726c9d7a506ce02185
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/ResultSet.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index 8d8e3a73f9d6..e31e39ed7c01 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -375,7 +375,7 @@ T OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT nType) if ((m_bWasNull = isNull(nColumnIndex))) return T(); - if (m_pSqlda->sqlvar[nColumnIndex-1].sqltype == nType) + if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == nType) return *((T*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata); else return T(); @@ -419,7 +419,7 @@ ISC_QUAD* OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHOR // TODO: this is probably wrong if ((m_bWasNull = isNull(nColumnIndex))) return 0; - if (m_pSqlda->sqlvar[nColumnIndex-1].sqltype == nType) + if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == nType) return (ISC_QUAD*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata; else throw SQLException(); // TODO: better exception (can't convert Blob) |