Hi Charles, You can use the setStartAtIndex() and setEndAtIndex() methods in org.apache.ojb.broker.query .Query class.
Regards, Lee Haw -----Original Message----- From: Charles Brault [mailto:chaz@;brault.com] Sent: Monday, October 21, 2002 3:59 AM To: [EMAIL PROTECTED] Subject: setting a limit when querying with Criteria How can I set a limit on the returned results when I'm using Criteria? My target databse is Postgres. If I want to set a limit I can write a sql statement like " SELECT * FROM FOO WHERE BAZ LIKE '%" LIMIT 1000". I tried using Criteria.addSQL("LIMIT 1000") but it creates a AND clause ("AND LIMIT 1000"). What I can't seem to figure out is how to tack on a bit of SQL text using Criteria without having it create and "AND" or "OR" clause. thanx chaz -- Charles E Brault [EMAIL PROTECTED] "Where are we going, and why am I in this handbasket?" -- To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>
