How can a pass an SQL text greater than 255 characters that has been stored in a table to the SQL property of a QueryDef?
In many words:
I have a table where I store the SQL to generate a report, field name is SQL2Use - a memo field as some of the SQL is quite long.
In my code I store the contents of SQL2Use in a variable sSQL2Use (declared as a variant) and later assign this to the SQL property of a qQueryDef as follows:
qdf.SQL = sSQL2Use
All works fine until I come across something with > 255 character.
My code sees only the text after the 1st 255 characters.
Can someone please help ?