PDA

View Full Version : SQL problem



nimmyj
24th December 2006, 10:38
Hi friends,
Happy Christmas :p
I have newly installed Qt4.2 opensource version in linux.I tried a program for Database access from Qt .then I got error MYSQL driver not loaded.I used one program which Jacek gave for similar thread,to find the current SQL drivers installed .but it returned a null set .does it mean no SQL driver is installed .but in the Qt installation folder I saw plugins for MYSQL and many others.Is this problem because of improper installation.

wysota
24th December 2006, 10:41
How did you install Qt? Did you compile it by yourself or did you use a package from some Linux distribution? In the first case did you enable compilation of plugins? In the latter case, did you install packages for Qt sql plugins along with their dependencies (for example the MySQL plugin needs MySQL libraries to work).

mandal
25th December 2006, 15:14
I am a newbie who tries to crate a static dll to access sql server database using qt libraries.

Although my cofiguration is totally different then yours(i am using sql server and qt 4.2 is installed on windows), I get "driver not loaded error" for ODBC when i try to use database calls without creating a QApplication object.
Creating a QApplication object before making any database calls may solve your problem too.

Hope this helps.

nimmyj
25th December 2006, 17:02
How did you install Qt? Did you compile it by yourself or did you use a package from some Linux distribution? In the first case did you enable compilation of plugins? In the latter case, did you install packages for Qt sql plugins along with their dependencies (for example the MySQL plugin needs MySQL libraries to work).

I installed Qt4.2 from trolltech site .it is a opensource version .dont know whether compiled plugins .just follwed the instructions given in INSTALL file.if I havent installed Plugins ,how to do that?

wysota
25th December 2006, 19:43
So I guess you compiled it yourself... Did you pass any arguments to configure? If not, then please call configure -help and read the help that gets displayed. You can also search this forum on how to compile the sql plugins, the issue was brought up several times.