I'm currently writing an application using VS C++, Qt, and SQLite.
I have a user interface where the user uses a series of combo boxes to select certain criteria that they want to fetch from the database. When this dialog closes, all of the combo boxes selected text (string values) will be passed, and concatenated, into a single string. Two string are created: the field name and the field values.
The final result or the strings will be, for example:
(Actual code uses vectors and 'for' loops:
string select = "SELECT " + field1 + ", "+ field2 etc
string whereClause = "Where " + field1 + "=" + comboString1 + " AND " + field2 + "=" comboString2 etc
These resulting two strings will be used in a SQLite database query where it will fetch the results and display them in another GUI window.
So, my question is to do with string length. I'm worried that the strings will become too big to store all of these literals(?) - there will be a large amount of queries when completed . Another alternative would be to store the string values in a text file. However, the SQL query needs to be a single string, a query can't be made in instalments (as far as I'm aware).
Any ideals? An external file.sql that SQLite could load or something.