Write data to a MySQL database [Solved]
-
Hello
I have made a program that connects to a MySQL database. and read the data from the database.
This works well.
But how can i wirte data to the dataBase
When I search with google I find only information about the MySQL driver.Can anybody help me?
Regards,
Wim -
You have a standard query, with INSERT INTO statement.
"SQL INSERT INTO reference":http://www.w3schools.com/sql/sql_insert.asp -
I want to write QString to an existing cell.
But not add a new row. -
"SQL UPDATE statement":http://www.w3schools.com/sql/sql_update.asp
-
Hi
connect to database
@
dBase = QSqlDatabase::addDatabase("QMYSQL");
dBase.setDatabaseName("name_database");
dBase.setHostName("127.0.0.1"); // ip or host
dBase.setUserName("root"); //user_name
dBase.setPassword("pass"); //
dBase.open();
@
and with a requests to write or read data from database.
For help read this "tread":http://qt-project.org/forums/viewthread/15037/