[SOLVED]windows failed to import .db extension file in application window



  • i compile "this ":http://www.developer.nokia.com/Community/Wiki/Creating_database_driven_applications_using_Qtsource code and want make a contact phone book. compiling the source code in release mode and then i added some required library mingw10.dll, qwidget.dll .......with the binary file. Run the binary file, it works fine. i can successfully add, delete and view contact list.

    problem happed when i test this binary file in friend's PC(windows). this application does not running. just show "Database not found". i try to find where is the problem. my friend does not use QT. when i install qt in his computer, then try to run this binary file. it works fine.

    that's means this application is run successfully if qt is installed in pc. binary file does not run where is not qt. why it's happed? i have tested in windows xp and seven. i m using QT 4.7.3

    this is the "source code":http://www.developer.nokia.com/Community/Wiki/images/0/04/Mba_sqlite_contacts.zip?20100608015633 of the contact phone book app. remind this, database file will save in your user home directory.

    and this is the "binary file":http://technologybasic.com/desktop-apps/contact.zip of the application which failed to import database file where qt is not installed.
    please help me. please.



  • [quote author="Mashpy" date="1366537654"]
    problem happed when i test this binary file in friend's PC(windows). this application does not running. just show "Database not found". i try to find where is the problem. my friend does not use QT. when i install qt in his computer, then try to run this binary file. it works fine.[/quote]

    That is because you lack the driver/s. They can be found on you [Qt_directory]/plugins/sqldrivers/

    Copy them to [your_application_directory]/sqldrivers/ folder, IIRC. Just to show your application directory should look like this:

    • [APP_DIR]
      ** App.exe
      ** QtCore.dll, etc
      ** sqldrivers (folder)
      *** qsqlite.dll, etc. (whatever driver you needed)*


  • Thanks. problem solved.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.