hi~
I use mariadb database, and i compiled the qt plugins about mysql driver again. I want to use the QSqlQuery:repare() and bindValue() function to insert data to my table.but it doesn't work. The following is my code :
QString strprepare = "INSERT INTO " + strIEDname + "_TREND ( q_max, q_ave, q_cnt, channelnum, datetime) "
"VALUES ( :q_max, :q_ave,:q_cnt, :channelnum, :datetime)";
ret_exec = query.prepare(strprepare);
if (!ret_exec)
{
str_errmsg = query.lastError().text();
}


query.bindValue(":q_max", QVariant(iter->second.front().Q_max) );
query.bindValue(":q_ave", QVariant(iter->second.front().Q_ave) );
query.bindValue(":q_cnt", QVariant(iter->second.front().Q_cnt) );
query.bindValue(":channelnum", QVariant(iter->second.front().channel) );
query.bindValue(":datetime", QVariant(iter->second.front().datetime) );
ret_exec = query.exec();
if (!ret_exec)
{
str_errmsg = query.lastError().text();
}

function prepare() works well. but exec() works fail, and the error message is "Using unsupported buffer type: -842150451 (parameter: 1) QMYSQL3: Unable to bind value"。
besides, i also use mysql 5.0 ,and it doesn't work either.

I really need your help. Thank you!
I 'm sorry for my poor english.