John,

I wrote the DB adaptor for Interbase, and it does support UPPER, except in
the ORDER BY clause.  I have no idea why this is so, for UPPER seems to work
fine _everywhere_ else.  Might be a bug in Interbase :-(.  Hopefully the new
opensource Interbase will solve my problems.

In the mean time the only suggestion I could come up with is to remove UPPER
from the ORDER BY clause in BasePeer - except if my assumption that UPPER
won't really make it difference is incorrect.

Regards
Leon

----- Original Message -----
From: John McNally <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Tuesday, June 06, 2000 5:38 PM
Subject: Re: BasePeer Problem


> Sorry for my bad eyesight or laziness, but what DB adaptor does Interbase
> use.  You should make the patch there.  The reason for putting the
> toUpperCase function in the DB interface was so that db dependent methods
> can be used.  If none exists you can just have it return the string.
>
> John
>
> ----- Original Message -----
> From: Leon Messerschmidt <[EMAIL PROTECTED]>
> To: Turbine <[EMAIL PROTECTED]>
> Sent: Tuesday, June 06, 2000 7:19 AM
> Subject: BasePeer Problem
>
>
> > Hi
> >
> > After the new DB class implementation I got the following exception:
> >
> > Exception: interbase.interclient.SQLException: [interclient][interbase]
> > Dynamic SQL Error
> > SQL error code = -104
> > Token unknown - line 1, char 147
> > UPPER
> >
> > Later I found that the problem is that BasePeer adds an uppercase to the
> > order-by criteria.  In other words the query looks something like this:
> >
> > SELECT COL1, COL2 FROM TABLE ORDER BY UPPER (COL3).
> >
> > Apparently some databases (Interbase for example) does not accept the
> "ORDER
> > BY UPPER".  I removed the uppercase from BasePeer (diff at the end) and
> the
> > problem went away.  I assume that this will not influence the working of
> > BasePeer for ORDER BY probably does not need for the column to be
> uppercase
> > to yield the correct sequence.
> >
> > Let me know if my assumptions are wrong.
> >
> > Regards
> > Leon
> >
> > diff -r1.23 BasePeer.java
> > 789,796c789
> > <                 if (  column.getType() instanceof String )
> > <
> >
> > <
                    orderByClause.add( db.toUpperCase(orderByColumn) );
> > <                 }
> > <                 else
> > <                 {
> > <                     orderByClause.add(orderByColumn);
> > <                 }
> > ---
> > >                 orderByClause.add(orderByColumn);
> >
> >
> >
> >
> > ------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
>
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to