Dear my friends...
Please tell me the solution of my problem. Compiling
succeeded but I got error message when I execute the
compiled code. My program does not run properly.
I am using Qt 3.1 and SuSE 8.2
prabu@susefujitsu:/usr/lib/qt3/plugins/sqldrivers>
/usr/lib/qt3/bin/qmake -o
/home/prabu/arsip/coba-2x/qt/3/Makefile
"INCLUDEPATH+=/usr/include" "LIBS+=-L/usr/lib
-lmysqlclient"
/home/prabu/arsip/coba-2x/qt/3/coba.pro
prabu@susefujitsu:/usr/lib/qt3/plugins/sqldrivers>
prabu@susefujitsu:~/arsip/coba-2x/qt/3> ls
coba.pro depanform.ui main.cpp main.cpp~
prabu@susefujitsu:~/arsip/coba-2x/qt/3> make
g++ -o coba .obj/main.o .obj/depanform.o
.obj/moc_depanform.o -L/usr/lib/ -L/usr/lib/qt3/lib/
-L/usr/X11R6/lib/ -L/usr/lib -lmysqlclient -lqt -lXext
-lX11 -lm
prabu@susefujitsu:~/arsip/coba-2x/qt/3> ls
Makefile coba coba.pro depanform.ui main.cpp
main.cpp~
prabu@susefujitsu:~/arsip/coba-2x/qt/3> ./coba
QSqlDatabase warning: QMYSQL3 driver not loaded
QSqlDatabase: available drivers: QMYSQL3 QPSQL7 QODBC3
prabu@susefujitsu:~/arsip/coba-2x/qt/3> cat coba.pro
SOURCES += main.cpp
unix {
UI_DIR = .ui
MOC_DIR = .moc
OBJECTS_DIR = .obj
}
FORMS = depanform.ui
TEMPLATE =app
CONFIG += qt warn_on release
LANGUAGE = C++
prabu@susefujitsu:~/arsip/coba-2x/qt/3> cat main.cpp
#include
On Tuesday 25 May 2004 14:23, Prabu Subroto wrote:
Dear my friends...
I want to develop a database application with qt and MySQL. I begin from a very simple application, only selecting (query : select * from book) a table.
Compiling succeeded. But if I executed the compiled program, I found this error message: " Error occurred while accessing the database ".
A couple of points:
1) Make sure you added the code to your app that makes the connection. You don't need it while working in Qt Designer, but it has to be coded into the app.
2) You need to compile your program as a threaded app or it won't make a connection.
Jeff
__________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/