Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt app with static odbc plugin can only work in the developer machine.

    General and Desktop
    1
    2
    1918
    Loading More Posts
    • 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.
    • B
      benkwan last edited by

      I static built the Qt source codes with VS2010, the command is:
      configure.exe -platform win32-msvc2010 -opensource -debug-and-release -static -fast -qt-sql-sqlite -plugin-sql-sqlite -qt-sql-odbc -plugin-sql-odbc -qt-zlib -no-qt3support -webkit -nomake docs -nomake demos -nomake examples

      And i create an app which access the MS Access database. In My app's main.cpp, I add:
      #include <QtPlugin>
      Q_IMPORT_PLUGIN(qsqlodbc)

      In my app's project file, I add :
      QTPLUGIN += qsqlodbc

      then I build the app, it works. But when I copy the exe file and the *.mdb file to a customer PC, the app can execute, but fail to access the database, the error is :
      QSqlError(-1056, "QODBC3: Unable to connect", "[Microsoft][ODBC Microsoft Access Driver] Could not find installable ISAM.")

      Is there anybody has met this before?

      1 Reply Last reply Reply Quote 0
      • B
        benkwan last edited by

        It works, I just deployed the app in the place without write permission.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post