Nominate our 2022 Qt Champions!

Casse sensitive mysql search with Qt

  • Hi,

    I want to do a casse sensitive search in mysql syntax using Qt. I know that to do a casse sensitive mysql search you should do something like this:

    SELECT * From GeoAndEnergies where SMILES='c1ccc(C2=NN=NC2=C2C=CC=CN2)nc1'
    AND BINARY SMILES='c1ccc(C2=NN=NC2=C2C=CC=CN2)nc1';

    I tryied to use the same syntax in Qt and it is not working at all, in the sense that the mysql crash.

    Does anyone know what I should use?

  • Lifetime Qt Champion


    Shouldn't you use COLLATE for that ?

    In any case, what do you mean by crash ? The query fails or the application crashes ? If the former, did you check the error returned by QSqlQuery ?

Log in to reply