This one time, at band camp, ODVARKO said:
O>I have tried the LIMIT keyword with MySQL database and I get an exception.
O>Any Ideas? Thanks for any help.
O>
O>String oql =
O> "SELECT v " +
O> "FROM <package>.MyClass v " +
O> "LIMIT $1, $2 ";
O>
O>OQLQuery query = db.getOQLQuery(oql);
O>query.bind(5);
O>query.bind(10);
O>
O>java.lang.ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsExceptions are usually thrown because a value
that was attempted to be fetched is not available. IOW, are you
sure that there are at least 10 rows available to be fetched? If
there are that many rows available, please post a bit more of the
code surrounding the query. Also, what version of the MySQL drivers
are you using? The current version is 2.0.14 and can be downloaded here:
http://sourceforge.net/project/showfiles.php?group_id=15923
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev