Solved QSqlQuery for ms access database
-
@sgaist
Yes that works.Then what should be inside the % % instead of foo for binding ???
what about binding ?? -
try this:
QSqlQuery query ; query.prepare("SELECT * FROM names where name like '%?%'" ); query.addBindValue("a");
-
I tested in Qt using access both 32 bits, this code works for me:
QString st = "a"; query->prepare("SELECT * FROM names WHERE name LIKE ?;"); QString criteria("%" + st + "%"); query->addBindValue(criteria);
-
@ronaldviscarral
Thank you very much it works now.