Selecting data from mysql using qt?
-
!http://hin.dp.ua/files/down/qt_scr.PNG(my screenshot)!
-
well i dont have that option. here is what i get
when i click file/new file or project then this screenshot
"Your text to link here...":http://www.freeimagehosting.net/uploads/702f633ae7.png
then i keep clicking next getting the follwoing screenshots
"Your text to link here...":http://www.freeimagehosting.net/uploads/ab872acfb8.png
"Your text to link here...":http://www.freeimagehosting.net/uploads/45c51ab364.png
"Your text to link here...":http://www.freeimagehosting.net/uploads/84605eae46.png
"Your text to link here...":http://www.freeimagehosting.net/uploads/84605eae46.png -
Well, it should make no problem to have SQL query before exec(), at least I don't have any problem with that.
Let's get back to square one:
You said if you uncomment the
@bool ok = db.open();@
then your program hangs. Can we see the value of 'ok'?
@qDebug() << ok;@
My guess is probably you have problems granting the rights in mysql when you've created the table... have you made
@GRANT ALL ON testTwo.* to 'root'at'localhost' IDENTIFIED BY 'somepassword';@
(Ouch please replace the 'at' with the 'at' sign, the forum motor uses it for code tags, I don't know how to write it... I hope it's not confusing.
I'm not sure if you can do it with empty password, I guess yes, but I never do that.) -
i think i did not install any mysql client. bcause it displays this output
@
root@zafar-laptop:/# mysql -h localhost -D testTwo -u root -p xxxxxx
The program 'mysql' can be found in the following packages:- mysql-client-core-5.1
- mysql-client-5.0
- mysql-cluster-client-5.1
Try: apt-get install <selected package>
@
-
here it is
@
root@zafar-laptop:/# dpkg --list | grep mysql
ii libmysqlclient-dev 5.1.41-3ubuntu12.6 MySQL database development files
ii libmysqlclient16 5.1.41-3ubuntu12.6 MySQL database client library
ii mysql-common 5.1.41-3ubuntu12.6 MySQL database common files (e.g. /etc/mysql@