reading multiline value from database, then using the value in query
Unsolved
General and Desktop
-
i'm reading (possibly) multiline (i.e. containing '\n') values from sqlite database and storing them in
QString
.
later, i need to use this value in a query like this:SELECT SomeID FROM SomeTable WHERE SomeText LIKE :the_text;
when i bind the value of stored string to
:the_text
, something goes wrong and it matches 0 results.
this is only true when the text is multiline. for single line it works fine. any idea what i can do? -
@user4592357
Do you mean the text you are searching for (bound tothe_text
) contains newlines, or do you just mean the column in the database you are searching in (SomeText
) contains newlines while the text you are searching for (the_text
) does not contain newlines? Give us an example of what you are bindingthe_text
to?