PDA

View Full Version : got error message "driver not loaded"



rivci
13th January 2011, 07:30
Hi all, I am new to QT.

I make an aplication that use microsoft access file (.mdb) as my database.
I am using QTCreator. I make a simple program that load database table to a gui.

I run my program with "QT in path release"

then I add these files to the "release" folder:
- libgcc_s_dw2-1.dll
- mingwm10.dll
- QtCore4.dll
- QtGui4.dll
- QtSql4.dll

I copy all file in the "release" folder and paste it to another computer (which qt is not installed) then I run the ".exe" file, the gui appear, but there is error when opening the database ( db.open() ). it says "driver not load".

Please show me how to solve this :)
I'm sorry if this is a stupid question :)

I'd read similiar posts in this forum. Just can't find the way out :o

tbscope
13th January 2011, 07:31
You didn't copy the sql plugin for the type of database you use.

See the Qt documentation for where to place them.

rivci
13th January 2011, 09:37
Still don't get it :o

do you mean "qsqlodbc4.dll" ?
I open the documentation, still don't got any clue, by the way, I am using Windows 7

Added after 1 42 minutes:

I got it :) I check my application's plugin path with --> QLibraryInfo::location(QLibraryInfo::PluginsPath)
it results --> C:/Qt/2010.05/qt/plugins

then I copy all my plugins to client's computer with the same path (in this case "C:/Qt/2010.05/qt/plugins")
:p It's simple :)

Anyone know how to change this path?