Closed icEngineer-tech closed 4 years ago
Hi,
db = QSqlDatabase::addDatabase("QSQLITE");
you are loading the SQLite driver, not the MySql driver
hi there, MySql doesn't work, it shows me failed if I set it to MySql
i'm gonna need more information
I'm using Qt 5.14.2, I use the C++17 compiler (MSVC2017), I use phpMyAdmin because I don't want to install Sql on my computer. The error is when I prepare the Query to send data to the db. The program execute line 161 instead of line 159 which shows me the error "Parameter count mismatch"
you should first check if qsr.prepare(...) returns true and if it returns false, show what qsr.lastError().text() says in that case
yes it returns false, the message is : "Parameter count mismatch"
some more things to test
it doesn't work; neither select nor create , also I tried "INSERT INTO mytab (operator_id, machine_id) VALUES (?, ?)" and same error
what is the error message if you don't use any parameters at all, i.e. select all rows
"no query unable to fetch row"
if it's not too much to ask and your database doesn't contain any confidential information: could I get temporary read only access to it for further analysis?
yes of course: check this: https://github.com/CppProgrammer23/QtProjects/blob/master/QMachine_Check_Up/Readme.md the readme.md: https://github.com/CppProgrammer23/QtProjects/tree/master/QMachine_Check_Up
the server doesn't accept connections from my IP address
probably database user privileges must be set accordingly. See https://dev.mysql.com/doc/refman/8.0/en/grant.html
seems to be abandoned and not really related to the driver anyway. Closing
Hello I am getting error "Failed to create account. Parameter cont mismatch", can somebody help me here is my code: https://github.com/nttminh/ticket-booking-dashboard
Hi, probably not, unless you provide more information and post code here and as minimal reproducible example
I've seen your readme.md file but my driver is loaded successfully, I have a problem with "Parameter count mismatch". when I try to connect to my database, it's ok, but when I want to send data it shows that error I use PHPMyAdmin, you can find my project under: https://github.com/CppProgrammer23/QtProjects/tree/master/QMachine_Check_Up