summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-18 16:15:18 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-07-18 16:21:42 +0200
commit9064010ad5b5ac12e0c3ef085a0f0ee56add500d (patch)
tree3d12b4f4a0bd2658766138fd7bac3a06338f5919 /connectivity
parent3d01edb5ed4c9eaf43b1a1d6049b5ae497372dc7 (diff)
Ugly/temporary hack to have SQL_SHORT working again.
Change-Id: I33dda57ce5d13ef9d2aff44e2f4949aa634ff0da
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/FResultSet.cxx27
-rw-r--r--connectivity/source/drivers/firebird/FResultSet.hxx4
2 files changed, 28 insertions, 3 deletions
diff --git a/connectivity/source/drivers/firebird/FResultSet.cxx b/connectivity/source/drivers/firebird/FResultSet.cxx
index 07b11eb53713..48bf0ab5c5a2 100644
--- a/connectivity/source/drivers/firebird/FResultSet.cxx
+++ b/connectivity/source/drivers/firebird/FResultSet.cxx
@@ -113,9 +113,34 @@ void OResultSet::ensureDataAvailable() throw (SQLException)
XSQLVAR* pVar = m_pSqlda->sqlvar;
for (int i = 0; i < m_fieldCount; pVar++, i++)
{
- aRow[i] = OString(pVar->sqldata, pVar->sqllen);
+// if ((pVar->sqltype & 1) == 0) // Cannot contain NULL
+// {
+// }
+// else // Can contain NULL
+// {
+// }
+// switch (pVar->sqltype)
+// {
+// }
+ if ( pVar->sqltype == SQL_SHORT ||
+ pVar->sqltype == SQL_SHORT + 1 ||
+ pVar->sqltype == SQL_LONG ||
+ pVar->sqltype == SQL_LONG + 1 ||
+ pVar->sqltype == SQL_INT64 ||
+ pVar->sqltype == SQL_INT64 + 1)
+ {
+ aRow[i] = OString::valueOf((sal_Int16) *pVar->sqldata);
+ fprintf(stderr, "N_" );
+ // TODO: sqlscale here.
+ }
+ else
+ {
+ // For now store as string
+ aRow[i] = OString(pVar->sqldata, pVar->sqllen);
+ }
}
m_sqlData.push_back(aRow);
+ fprintf( stderr, "\n" );
}
ISC_STATUS aErr = isc_dsql_free_statement(m_statusVector,
diff --git a/connectivity/source/drivers/firebird/FResultSet.hxx b/connectivity/source/drivers/firebird/FResultSet.hxx
index 06b8d2deeb39..3b00fd719bd4 100644
--- a/connectivity/source/drivers/firebird/FResultSet.hxx
+++ b/connectivity/source/drivers/firebird/FResultSet.hxx
@@ -58,8 +58,8 @@ namespace connectivity
namespace firebird
{
- typedef std::vector< OString> TRow;
- typedef std::vector< TRow> TTable;
+ typedef std::vector< ::rtl::OString > TRow;
+ typedef std::vector< TRow > TTable;
/*
** OResultSet