Hi there,

just as a fast advice: conforming to Torque Javadocs, try using crit1.and(BookPeer.TIME, new GregorianCalendar(2003, 7, 1), Criteria.LESS_EQUAL) instead of andDate. Since addDate and andDate show handle dates in a similar way, there may be a problem in the implementation of the date-related and() function, which does not generate a mysql- compliant date-string from GregorianCalendar (that's why the serialized form og the GregorianCalendar object appears in the query).

What version of Torque are you using? It may be an issue already fixed in the latest version/s.

On Fri, 1 Aug 2003 21:03:02 +0800, sailorhero <[EMAIL PROTECTED]> wrote:
I use addDate() and andDate() to query some line .

first:
I want to know where is the diffirent between the two methods.

It differs in a very trivial manner: add* adds only one criterion, and the second time you call it, it replaces the first one. Add* functions are useful for adding one criterion to a query, or adding the first one. And* adds additional criterion, which then will be separated by 'and's in the query.



Best regards, Laszlo -- Murvai-Buzogány László T-Sys Kft. Software developer Tel.: (06)-1 436-8724 [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to