From c3da11f658e572d19ad00d6c5e6ff8ecb884bf66 Mon Sep 17 00:00:00 2001 From: randomdan Date: Sun, 2 May 2010 12:44:03 +0000 Subject: Ditch crazy timetypepair and just use an ODBC struct --- libodbcpp/selectcommand.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libodbcpp/selectcommand.cpp') diff --git a/libodbcpp/selectcommand.cpp b/libodbcpp/selectcommand.cpp index 92b4077..025141a 100644 --- a/libodbcpp/selectcommand.cpp +++ b/libodbcpp/selectcommand.cpp @@ -2,6 +2,7 @@ #include "error.h" #include "column.h" #include +#include ODBC::SelectCommand::SelectCommand(const Connection& c, String s) : Command(c, s) @@ -110,15 +111,14 @@ ODBC::SelectCommand::execute() columns[col] = i; break; } - case 11: + case SQL_TIMESTAMP: case SQL_DATETIME: case SQL_TYPE_TIME: case SQL_TYPE_DATE: case SQL_TYPE_TIMESTAMP: { - _Column* t = new _Column(colName, col); - t->bind(hStmt, sqlcol, SQL_C_TYPE_TIMESTAMP, &t->value.sql(), - sizeof(SQL_TIMESTAMP_STRUCT)); + _Column* t = new _Column(colName, col); + t->bind(hStmt, sqlcol, SQL_C_TIMESTAMP, &t->value, sizeof(SQL_TIMESTAMP_STRUCT)); columns[col] = t; break; } -- cgit v1.2.3