Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8488

QODBC doesn't build with ODBC3.0 driver manager (unixodbc)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.6.3
    • 4.6.2
    • SQL Support
    • None
    • 194bbeed0152d541527059bb0f1dae60a8573912

      For driver managers older than 3.5 SQL_GUID is undefined, which leads to a build error, but the documentation implies that we support driver versions older than 3.5.

      Maybe a simple ifdef like this would do:

      diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
      index 2049a76..d16fbbb 100644
      --- a/src/sql/drivers/odbc/qsql_odbc.cpp
      +++ b/src/sql/drivers/odbc/qsql_odbc.cpp
      @@ -307,7 +307,9 @@ static QVariant::Type qDecodeODBCType(SQLSMALLINT sqltype, const T* p, bool isSi
      #endif
      case SQL_CHAR:
      case SQL_VARCHAR:
      +#if (ODBCVER >= 0x0350)
      case SQL_GUID:
      +#endif
      case SQL_LONGVARCHAR:
      type = QVariant::String;
      break;
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            bilking Bill King
            ntg Pierre Rossi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes