I cannot get LIKE to work in the following scenario (Like and Field are initialized, just using a snippet...):
Qt Code:
  1. QString Like; QString Field;
  2. query.prepare("SELECT Name, CustomerID FROM Customer WHERE ? LIKE ?");
  3. query.addBindValue(Field);
  4. query.addBindValue(QString("%%1\%").arg(Like));
  5. query.exec();
To copy to clipboard, switch view to plain text mode