That certainly is much easier. I'll let you know how it turns out.
Thanks so much for the tip.
Charlie
Jakob Braeuchi said the following on 9/16/2004 4:37 PM:
hi charles,
using the broker may be easier:
String sql =
broker.serviceSqlGenerator().getPreparedSelectStatement(query, cld);
jakob
Jakob Braeuchi schrieb:
hi charles,
you could use SqlQueryStatement#getStatement. but the constructor of
SqlQueryStatement need Platform , ClassDescriptor , Query query and
Logger.
i have a very old version of a sql-paging solution but it no longer
fits into the current code.
jakob
Charles N. Harvey III schrieb:
Hello there.
I have used the .setStartAtIndex() and .setEndAtIndex() methods
before but
that happens in the java and not while executing the query. Now, I
know that
this happens because of the wide variation in adding limits to
queries between
database vendors.
So the way to do it is to do a QueryBySql instead of a
QueryByCriteria. Then
I type in the statement as I like, and add my "LIMIT 100" at the
end. This
is just fine by the way, most of the time.
What I would like to do is a QueryByCriteria, and then add some SQL
to it
after it is built. Like, I dunno, myCritQuery.toString() + " LIMIT
100";
But toString() does not produce the SQL of course. What does? Can
I get
at the SQL statement so I can add to it? Then I can create a
QueryBySql from
that. And that would be wonderful.
Is this possible? Is there a better way?
Thanks a lot.
Charlie
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]