diff options
author | randomdan <randomdan@localhost> | 2010-05-02 12:44:03 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-05-02 12:44:03 +0000 |
commit | c3da11f658e572d19ad00d6c5e6ff8ecb884bf66 (patch) | |
tree | c7035bcc0741ce7472ec6dbb56b4dc93913ee5af /libodbcpp/selectcommand.cpp | |
parent | Add a writeToBuf function and use it (diff) | |
download | libdbpp-odbc-c3da11f658e572d19ad00d6c5e6ff8ecb884bf66.tar.bz2 libdbpp-odbc-c3da11f658e572d19ad00d6c5e6ff8ecb884bf66.tar.xz libdbpp-odbc-c3da11f658e572d19ad00d6c5e6ff8ecb884bf66.zip |
Ditch crazy timetypepair and just use an ODBC struct
Diffstat (limited to 'libodbcpp/selectcommand.cpp')
-rw-r--r-- | libodbcpp/selectcommand.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 <sqlext.h> +#include <stdio.h> 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<TimeTypePair>* t = new _Column<TimeTypePair>(colName, col); - t->bind(hStmt, sqlcol, SQL_C_TYPE_TIMESTAMP, &t->value.sql(), - sizeof(SQL_TIMESTAMP_STRUCT)); + _Column<SQL_TIMESTAMP_STRUCT>* t = new _Column<SQL_TIMESTAMP_STRUCT>(colName, col); + t->bind(hStmt, sqlcol, SQL_C_TIMESTAMP, &t->value, sizeof(SQL_TIMESTAMP_STRUCT)); columns[col] = t; break; } |