I am not sure if SQLExecDirect has its own internal statement length limit,
why it would have it or what it would be, but here is the list of i5/OS SQL
statement length limits on different versions of the OS:

V5R1 Longest SQL statement 32,767
V5R2 Longest SQL statement 65,535
V5R3 Longest SQL statement 65,535
V5R4 Longest SQL statement (in bytes) 2 097 152 (2MB)

I personally would follow published system limits as i5/OS usually updates
all of their components to comply with new limits as new OSes are released.

HTH, Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i5/OS and OS/400
www.centerfieldtechnology.com


-----Original Message-----
Subject: Quick SQL question

Does anybody know off-hand the maximum length of the "SQL statement
string" that SQLExecDirect can accept?

I don't even know where I'd look that up, myself. But I know I've got
customers who are requesting searches so complicated that my program is
running out of buffer space when it builds the SQL. (Currently, I have a
4k buffer for building the statement, while the "where" and "join"
portions are built as subassemblies, each in its own 1k buffer).


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].