summaryrefslogtreecommitdiff
path: root/libodbcpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-01-30 20:20:18 +0000
committerrandomdan <randomdan@localhost>2011-01-30 20:20:18 +0000
commitf725edb356800402b8f9ee48c3ac9691dbbebbb6 (patch)
treed6d43e64529b37057cd134d1f1944900e1124958 /libodbcpp
parentCentralise the ICE splicer (diff)
downloadlibdbpp-odbc-f725edb356800402b8f9ee48c3ac9691dbbebbb6.tar.bz2
libdbpp-odbc-f725edb356800402b8f9ee48c3ac9691dbbebbb6.tar.xz
libdbpp-odbc-f725edb356800402b8f9ee48c3ac9691dbbebbb6.zip
Address type inconsistency issue with size functions
Diffstat (limited to 'libodbcpp')
-rw-r--r--libodbcpp/bind.h2
-rw-r--r--libodbcpp/column.h8
-rw-r--r--libodbcpp/param.h12
3 files changed, 11 insertions, 11 deletions
diff --git a/libodbcpp/bind.h b/libodbcpp/bind.h
index cd45cf6..c256b2b 100644
--- a/libodbcpp/bind.h
+++ b/libodbcpp/bind.h
@@ -11,7 +11,7 @@ namespace ODBC {
virtual ~Bind() = 0;
virtual SQLSMALLINT ctype() const = 0; // The C type ID
- virtual SQLINTEGER size() const = 0; // The size of the data
+ virtual SQLULEN size() const = 0; // The size of the data
protected:
mutable SQLLEN bindLen; // How much data the driver wants to store
};
diff --git a/libodbcpp/column.h b/libodbcpp/column.h
index 472f806..1ea4091 100644
--- a/libodbcpp/column.h
+++ b/libodbcpp/column.h
@@ -57,7 +57,7 @@ namespace ODBC {
}
virtual SQLSMALLINT ctype() const { return SQL_C_CHAR; }
virtual SQLSMALLINT stype() const { return SQL_CHAR; }
- virtual SQLINTEGER size() const { return data.size(); }
+ virtual SQLULEN size() const { return data.size(); }
virtual SQLINTEGER dp() const { return 0; }
virtual const void * dataAddress() const { return &data.front(); }
virtual void * rwDataAddress() { return &data.front(); }
@@ -78,7 +78,7 @@ namespace ODBC {
SignedIntegerColumn(SelectCommand * sc, const Glib::ustring & n, unsigned int i) :
Column(sc, n, i) { }
virtual SQLSMALLINT ctype() const { return SignedIntegerParam::ctype(); }
- virtual SQLLEN size() const { return SignedIntegerParam::size(); }
+ virtual SQLULEN size() const { return SignedIntegerParam::size(); }
virtual void * rwDataAddress() { return &data; }
virtual const Glib::ustring & compose() const;
virtual Glib::ustring compose(const Glib::ustring & fmt) const;
@@ -106,7 +106,7 @@ namespace ODBC {
FloatingPointColumn(SelectCommand * sc, const Glib::ustring & n, unsigned int i) :
Column(sc, n, i) { }
virtual SQLSMALLINT ctype() const { return FloatingPointParam::ctype(); }
- virtual SQLLEN size() const { return FloatingPointParam::size(); }
+ virtual SQLULEN size() const { return FloatingPointParam::size(); }
virtual void * rwDataAddress() { return &data; }
virtual const Glib::ustring & compose() const;
virtual Glib::ustring compose(const Glib::ustring & fmt) const;
@@ -121,7 +121,7 @@ namespace ODBC {
TimeStampColumn(SelectCommand * sc, const Glib::ustring & n, unsigned int i) :
Column(sc, n, i) { }
virtual SQLSMALLINT ctype() const { return TimeStampParam::ctype(); }
- virtual SQLLEN size() const { return TimeStampParam::size(); }
+ virtual SQLULEN size() const { return TimeStampParam::size(); }
virtual void * rwDataAddress() { return &data; }
virtual const Glib::ustring & compose() const;
virtual Glib::ustring compose(const Glib::ustring & fmt) const;
diff --git a/libodbcpp/param.h b/libodbcpp/param.h
index 0009956..661d9b3 100644
--- a/libodbcpp/param.h
+++ b/libodbcpp/param.h
@@ -33,7 +33,7 @@ namespace ODBC {
SignedIntegerParam(Command * c, unsigned int i) : Param(c, i) { bindLen = size(); }
virtual SQLSMALLINT ctype() const { return SQL_C_LONG; }
virtual SQLSMALLINT stype() const { return SQL_C_LONG; }
- virtual SQLINTEGER size() const { return sizeof(SQLINTEGER); }
+ virtual SQLULEN size() const { return sizeof(SQLINTEGER); }
virtual SQLINTEGER dp() const { return 0; }
virtual const void * dataAddress() const { return &data; }
void operator=(const SQLINTEGER & d) { data = d; }
@@ -46,7 +46,7 @@ namespace ODBC {
UnsignedIntegerParam(Command * c, unsigned int i) : Param(c, i) { bindLen = size(); }
virtual SQLSMALLINT ctype() const { return SQL_C_ULONG; }
virtual SQLSMALLINT stype() const { return SQL_C_ULONG; }
- virtual SQLINTEGER size() const { return sizeof(SQLUINTEGER); }
+ virtual SQLULEN size() const { return sizeof(SQLUINTEGER); }
virtual SQLINTEGER dp() const { return 0; }
virtual const void * dataAddress() const { return &data; }
void operator=(const SQLUINTEGER & d) { data = d; }
@@ -59,7 +59,7 @@ namespace ODBC {
FloatingPointParam(Command * c, unsigned int i) : Param(c, i) { bindLen = size(); }
virtual SQLSMALLINT ctype() const { return SQL_C_DOUBLE; }
virtual SQLSMALLINT stype() const { return SQL_C_DOUBLE; }
- virtual SQLINTEGER size() const { return sizeof(SQLDOUBLE); }
+ virtual SQLULEN size() const { return sizeof(SQLDOUBLE); }
virtual SQLINTEGER dp() const { return 10; }
virtual const void * dataAddress() const { return &data; }
void operator=(const SQLDOUBLE & d) { data = d; }
@@ -72,7 +72,7 @@ namespace ODBC {
GlibUstringParam(Command * c, unsigned int i) : Param(c, i) { bindLen = size(); }
virtual SQLSMALLINT ctype() const { return SQL_C_CHAR; }
virtual SQLSMALLINT stype() const { return SQL_CHAR; }
- virtual SQLINTEGER size() const { return data.bytes(); }
+ virtual SQLULEN size() const { return data.bytes(); }
virtual SQLINTEGER dp() const { return 0; }
virtual const void * dataAddress() const { return data.data(); }
void operator=(const Glib::ustring & d);
@@ -85,7 +85,7 @@ namespace ODBC {
TimeStampParam(Command * c, unsigned int i) : Param(c, i) { bindLen = size(); }
virtual SQLSMALLINT ctype() const { return SQL_C_TYPE_TIMESTAMP; }
virtual SQLSMALLINT stype() const { return SQL_TYPE_TIMESTAMP; }
- virtual SQLINTEGER size() const { return sizeof(SQL_TIMESTAMP_STRUCT); }
+ virtual SQLULEN size() const { return sizeof(SQL_TIMESTAMP_STRUCT); }
virtual SQLINTEGER dp() const { return 0; }
virtual const void * dataAddress() const { return &data; }
void operator=(const time_t & d);
@@ -100,7 +100,7 @@ namespace ODBC {
NullParam(Command * c, unsigned int i) : Param(c, i) { bindLen = SQL_NULL_DATA; }
virtual SQLSMALLINT ctype() const { return SQL_C_LONG; }
virtual SQLSMALLINT stype() const { return SQL_C_LONG; }
- virtual SQLINTEGER size() const { return 0; }
+ virtual SQLULEN size() const { return 0; }
virtual SQLINTEGER dp() const { return 0; }
virtual const void * dataAddress() const { return NULL; }
};