Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  06 Sep 2009, Exaos Lee, Bug Report, Compiling error of "src/history_odbc.cxx" build-err.log
    Reply  06 Sep 2009, Exaos Lee, Bug Report, Compiling error of "src/history_odbc.cxx" 
       Reply  06 Sep 2009, Exaos Lee, Bug Fix, Maybe a fix history_odbc.cxx.diff
Message ID: 637     Entry time: 06 Sep 2009     In reply to: 636
Author: Exaos Lee 
Topic: Bug Fix 
Subject: Maybe a fix 
Changing "SQLINTEGER" to "SQLLEN" maybe let the compiling pass. See the attached diff.

But I failed in another error. It was the problem in CMakeLists.txt. (FIXED)
Attachment 1: history_odbc.cxx.diff  664 Bytes  | Hide | Hide all
diff --git a/src/history_odbc.cxx b/src/history_odbc.cxx
index 5f00016..392062f 100644
--- a/src/history_odbc.cxx
+++ b/src/history_odbc.cxx
@@ -584,7 +584,7 @@ int SqlODBC::Exec(const char* sql)
 
 int SqlODBC::GetNumRows()
 {
-   SQLINTEGER nrows = 0;
+   SQLLEN nrows = 0;
    /* How many rows are there */
    int status = SQLRowCount(fStmt, &nrows);
    if (!SQL_SUCCEEDED(status)) {
@@ -634,7 +634,7 @@ int SqlODBC::Done()
 const char* SqlODBC::GetColumn(int icol)
 {
   static char buf[1024];
-  SQLINTEGER indicator;
+  SQLLEN indicator;
   int status = SQLGetData(fStmt, icol, SQL_C_CHAR, buf, sizeof(buf), &indicator);
 
   if (!SQL_SUCCEEDED(status)) {
ELOG V3.1.4-2e1708b5