I am putting together a long sql string from smaller sqlclaused from user supplied data as part of a search by form form.
Basically the sqlstring is:
SELECT strSQLClause1 & " " & strSQLClause2 & " " & strSQLClause3 & " " ... FROM...
It works with 12 strSQLClauses but if I exceed that (I have 36) I get an Error 2001 You canceled the previous operation error.
I've tried the code with and without line continuation characters and that doesn't matter. I get the same result.
I've read conflicting things about how long a SQL string can be.
Does anyone know how long the string can be and have a work around. The different claused are not static and can change with user input.
Thanks
Basically the sqlstring is:
SELECT strSQLClause1 & " " & strSQLClause2 & " " & strSQLClause3 & " " ... FROM...
It works with 12 strSQLClauses but if I exceed that (I have 36) I get an Error 2001 You canceled the previous operation error.
I've tried the code with and without line continuation characters and that doesn't matter. I get the same result.
I've read conflicting things about how long a SQL string can be.
Does anyone know how long the string can be and have a work around. The different claused are not static and can change with user input.
Thanks