Solved

[Qt + MySql] Deploying an Application... Driver not load on other computer

Posted on 2008-10-21
8
2,366 Views
Last Modified: 2013-11-23
Hi everybody,

I created an application that use a mysql , it work very well at home where qt and the driver are install.

When I try my application on any others computer i got the error message "Drivers not load".

All the DLL are in places, it seems I need to add something to attach the drivers to my application.

Help me plzz !!
0
Comment
Question by:tinzaker
  • 5
  • 3
8 Comments
 
LVL 3

Expert Comment

by:tdor
ID: 22772176
Hello tinzaker,

try to register the drivers on the "away from home" machine
from start menu/run

regsvr32.exe "path to the drivers" (with the " if you have spaces in the path)
ex: regsvr32.exe "c:\my app\my project\needed_dll.dll"

Regards,

tdor
0
 

Author Comment

by:tinzaker
ID: 22772775
I tried : regsvr32.exe C:\Documents and Settings\Alexis\Bureau\File\Programation\C++\Projet\SE\release\QtSql4.dll

but i got this message error : LoadLibrary("Path to dll") has failed, the specified module could not be found.

I don't really know where is the driver of mysql... but i know that i need the QtSql4.dll
It is for mysql uses.
0
 

Author Comment

by:tinzaker
ID: 22772789
oups i forgot the "

but i still have this error : (path to dll) was loaded but the entry point DLLregisterserver cannot be found
0
 
LVL 3

Accepted Solution

by:
tdor earned 235 total points
ID: 22779610
Hi,

Some things come to mind
- the application is looking for that .dll in a specific place
- the .dll is registered more then once in registry
- this .dll is dependent of another .dll  (use dependency walker to find out if that's the case - http://www.dependencywalker.com/) (I'm thinking of QtGui4.dll, QtCore4.dll QtXm14.dll, mingwm10.dll, qsqlite4.dll, etc)
- according to http://support.microsoft.com/kb/249873 the "Dllname may not be exported, or a corrupted version of Dllname may be in memory. Consider using Pview to detect the file and remove it. ". Or a different version of the .dll is in memory (pview can be found here http://www.teamcti.com/pview/prcview.htm. You'll be able to view the .dlls in memory by going to view menu and choosing module usage. Left click on the .dll and choose Filter Process List to see what's using that dll)
- go to Control Pannel / Administrative Tools and start "Data Sources (ODBC)". Enable tracing. See if in the logs there is some aditional info about the error
- download the MDAC checker to see if no ODBC driver is corrupt (http://www.microsoft.com/downloads/details.aspx?familyid=8f0a8df6-4a21-4b43-bf53-14332ef092c9&displaylang=en)




tdor
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:tinzaker
ID: 22781518
If I look with dependency walker everything is in my project folder on every computer

but when I look out my program with pview, on my computer there some dll that are loaded in the Qt folder.

If I'm not working on my computer, the dll that were in the qt folder are not even mention... I think it's these dll that my program need, but how to attach them to it.


what are ODBC driver... I think I have a link with Visuall...

my compiler is mingw by the way
0
 
LVL 3

Expert Comment

by:tdor
ID: 22781715
Unfortunately I do not have experience with mingw
Try to put in the folder (on other computer) all the dlls that are missing from the QT folder
register then with regsvr32

About the ODBC -> http://en.wikipedia.org/wiki/Odbchttp://en.wikipedia.org/wiki/Odbc

0
 

Author Comment

by:tinzaker
ID: 22782733
Thanks man for your help, Ifinally solved my problem after a few day of hard work !!

It's just that you need to specified to your application where you put the driver.

I created a folder named plugins, and add to it the containt of qt plugins folder

The Pview really help me and this web page too, http://doc.trolltech.com/4.1/deployment-windows.html#creating-the-application-package

You just need to go on Pview chack all the dll that are not in the project folder and them.
You have no had this function with the pash of your plugins: QCoreApplication::addLibraryPath("./plugins")

If you have any question just ask me by this post ! or alexj13@videotron.ca

0
 

Author Closing Comment

by:tinzaker
ID: 31508512
I put you good mark because you answered fast !! and I found a perfect clean solution because of you

Thanks man !!!!

You really Helped me
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Creating and Managing Databases with phpMyAdmin in cPanel.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now