I did some research and there is result:

- when the field is created it has DataType ftString
- when the QBEMode is set to true, DataType change to 231

That's why the SQL is not correctly generated because you do not count on DataType 231.