If netbeans ide has a queryproperty set to
SELECT c FROM Content c
How can I change this query to say ..limit the resultset to less records like 10 or 20 instead of the whole database.

I am not sure what that SQL string would look like.

If your database supports the "TOP" clause, you can use that. If not, then this is usually done by calling setMaxRows() on the Statement object in JDBC. Since you are using beans binding, I have no idea what to tell you because I don't have any api docs for that model and I've never touched it.

Edit: If you're using the Persistence API Query object, there is a setMaxResults() method available.

setMaxResults()
that seems very logical I will explore this.
Thanks
-Steve

exellent. query.setMaxResults(10); is my first manipulation of the original query.

now I must create a new query.
Thanks
-Steve

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.