"Diethelm Guallar, Gonzalo" <[EMAIL PROTECTED]> writes:
> I know this has surfaced before; I would like to recap
> what is necessary to fix this problem.
>
> The current peer system does not handle very well issues
> of formatting for datatypes where the formatting depends
> somehow on the client and server side. For example, if
> you have a table such as
>
> create table a (d date);
>
> it is not easy to do this portably:
>
> Date d = new Date();
> Criteria c = new Criteria();
> c.add(APeer.D, d);
> Vector data = APeer.doSelect(c);
>
> The problem is the SQL code the doSelect() generates; how
> does it format the passed in date? It could generate this:
>
> SELECT * FROM A WHERE D = '12-25-1999'
>
> but if the DB is configured to expect dates as DD-MM-YYYY,
> the query will fail.
Another solution would be to have the DB adapters provide methods
formatting Java's Date object as expected for each RDBMS.
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]