Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qodbc + W7 pro 64 bit problem [Solved]
Qt 6.11 is out! See what's new in the release blog

Qodbc + W7 pro 64 bit problem [Solved]

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    luca
    wrote on last edited by
    #1

    Hi all,
    I got a strange problem using mysql odbc in a Qt app for Windows 7 pro 64 bit.

    I was deploying using QtSDK 1.2.1. The same application ran without problems in Q7 32 bit.

    Running the application in W7 pro 64 bit I get this message from QODBC driver:
    @
    The specified DSN contains an architecture mismatch between the Driver and Application
    @

    and this is the code:
    @
    QSqlDatabase db;
    db = QSqlDatabase::addDatabase("QODBC");
    db.setDatabaseName("ODBC;DSN=gw_register;DATABASE="+db_name);
    db.setHostName(ip);
    db.setUserName(user);
    db.setPassword(pwd);

    if(db.open())
    {
        qDebug() << "OK";
    }
    else
    {
        qDebug() << "KO";
        qDebug() << db.lastError();
    
        exit(123);
    }
    

    @

    As I wrote before, the same code works fine in other W7 systems.

    Finally I found this solution (but I don't know why does it works... ) :

    • installed the mysql odbc 32 bit (not 64)
    • executed c:\windows\sysWOW64\odbcad32
    • added the new odbc DSN in "System DSN"

    I hope this can help you if you had the same problem... ;-)

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BelenMuñoz
      wrote on last edited by
      #2

      I have the same problem, but I use Oracle plugin (with QODBC and QOCI), and I wasn't able to make it work. Somebody had the same problem?

      Me casé con un enano pa jartarme de reí.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved