Quote:
Originally Posted by macropod
SQLStatement is suitable for query strings up to 255 characters. Where the query string is longer than 255 characters, you'd use SQLStatement1 for the remainder; there is no specified character limit for SQLStatement1.
|
Hi Paul,
Are you sure SQLStatement1 accepts a longer string?
Code:
strSQL1 = Left(strSQL, 255)
strSQL2 = Right(strSQL, Len(strSQL) - 255)
My statement is 514 characters long, and the .OpenDataSource statement is throwing up runtime error 9105, 'string is longer than 255 characters'.
If I remove a few spaces or one of the WHERE criteria from the statement, it executes ok...