V4RB Query size

Fitzbew at aol.com Fitzbew at aol.com
Mon May 26 17:16:41 CDT 2003


Does Valentina have a limit to SQL query size?   In an app I am developing, I 
build a query that has a large number (hundreds) of 'OR' statements (e.g., 
... AND (my_code = '001' OR my_code = '002' OR my_code ='003'...).   In this 
particular scenario, I can build a query that has up to about 845 such elements 
without any problems.   But when I add one more "OR" element, Valentina 
suddenly returns a "Expected Key Word From" (Error code 600) error.   The query is 
NOT missing a FROM key word. I can then remove a single "OR" element and it 
works fine.   The query that generates the error returns 38,357 to Len(query). 

The number of "OR" elements I can "get away with" varies depending on the 
length of the query.    I can drop out other "AND" statements and I find I can 
then add more "OR" elements.    So I assume the limitation is query size.

If this is by design, is there some way I can determine in advance whether a 
particular query will cause the error?   Perhaps I should just test the string 
length?

I'm using V4RB 1.9.7, RB 4.5.2, (OS 10.2.6).

Thanks,
Fitzbew


More information about the Valentina mailing list