Qt5 C++ Connecting Qt Application To Mysql Database #28

preview_player
Показать описание
Join Qt6 C++ GUI & Mobile App Development Course in Udemy

Hello Youtubers, In this video tutorial we are going to talk about Qt database programming.
particularly in this video we want to learn how you can Connect your Qt Application To Mysql Database for Mysql Database purpose we are using wamp server

Download DLL
Рекомендации по теме
Комментарии
Автор

Nice video!
But I think is better using
....//Previous code
if(db.open()){

QMessageBox::information(this, "Connection", "Database Connected");

}else{
QSqlError error = db.lastError();
//With this you get to know better why the connection failed
QMessageBox::information(this, "Connection", error.databaseText());
//if you change databaseText() by text() you get the error reported by the driver and the database
}
Again thanks for the video, especially the part about the dlls

davidmoralesguerrero
Автор

Nice Video and the way you are telling,

how to do this in linux ?

AkashThorat-hc
Автор

I put these two dll's in every bin folder i could find.. it didnt work :(
Always still the same error that you got in the first place

Chris-Ober
Автор

Great Stuff. Do we have to register the database plugins?

DrIT-qvek
Автор

Hi, If the database is sitting on an online server will I still be able to connect in a similar way or is it much more complicated?

cdunne
Автор

Thank you good man for this tuttorial. Subscribed :)

XezolPL
Автор

Hi. Very nice this tutorial. Congratulations.
I saw you didn´t use the MySql connector. Do this means that the Qt Creator already has de needed drivers? Do ya think it isn´t needed? Thanks for your attention.

nelsonlerma
Автор

Do you have any solution for driver error in ubuntu?

hooraabootalebi
Автор

Please make a tutorial on building mysql driver for android

hiteshmitruka
Автор

I only have these database drivers
"QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7"
Don't have "QMYSQL" and "QMYSQL3" drivers.
Can you please help with how can I get them?

sadabwasi
Автор

Still getting problem with QMYSQL driver not loaded . Is this problem occurs due to i don't have QMYSQL driver in plugin/sqldriver ?
Thank you .

ChoudharyRamesh
Автор

how do you fix this error:
"
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QPSQL
"

thesoftwareproject
Автор

i do many time but still show same error : QSqlDatabase: available drivers: QSQLITE QMIMER QODBC QPSQL
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMIMER QODBC QPSQL
duplicate connection name 'qt_sql_default_connection', old connection removed.
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMIMER QODBC QPSQL
duplicate connection name 'qt_sql_default_connection', old connection removed.

ramabhusal
Автор

I'm on this for 4 days now, trying to solve why my database gets connected but the data doesn't get inserted. Anyone with the same issue was able to solve it?

melodicWonders
Автор

hi sir i got little problem when i run in ubuntu
how to configure mysql drivers in ubuntu with qt5
please put a video about configuring qt5 with mysql in ubunut

ecchisenseisvault
Автор

No, didn't work for me, i downloaded both DDL files, tho idk 32 or 64 bits, what should it be ?, i have mingw32, and i tried both

AsgatinDortexus
Автор

Does this works with qt in raspberry pi with raspbian os ?

adjiefajarramadhan
Автор

Pls how can I download the two files in linux mint 32bit

muhammadabdullah-zlgb
Автор

My Database connected but i cannot see the database....Why??

ajoydev
Автор

Still can't connect
im using mingw btw

tictactoc