Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#161 search function doesn't work under sybase

open
nobody
None
5
2008-04-13
2008-04-13
PatL
No

a) it takes a very oracle-centric view of the sql to create ({fn
LCASE(blah) would never work under sybase), this probably ought to come out
of the database adaptor somewhere.
b) the sybase jdbc3 driver seems to think lcase is a valid ase string
function when it returns the list of string functions. I know it is valid
in asa, and they share jdbc drivers but that isn't much of an excuse...)
Again, I guess this could probably be solved via the database adaptor
(split the sybase adapter into an ASE adapter and a ASA adapter) unless
someone has a smarter idea?

Discussion

  • Julen Parra
    Julen Parra
    2008-04-16

    Logged In: YES
    user_id=180901
    Originator: NO

    Uhm. That's not an ORACLE call, but rather a theoretically-independent JDBC-escape-function. You can read about that in http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/statement.html (section 4.1.5). Short story, the string between curly brackets should be interpreted by the JDBC driver and converted to a database-specific function with appropriate syntax. If the sybase driver isn't doing it, then it's its own bad behavior. Except if it's telling us in its getStringFunctions() that it doesn't support that particular function. You seem to imply that that is not the case, and getStringFunctions() return lcase() as valid. As the article tells, the list of functions returned by getStringFunctions() are the "standard" jdbc functions supported, not the database specific functions. If you get lcase(), then the driver should be able to convert it to LOWER_CASE() or toLowerCase(), or whatever Sybase uses, before sending the string to the database. Perhaps it's doing it, and the error lies elsewhere. If you check it, please keep us updated. If in the end the driver is at fault, of course some function can be defined in the adapter to solve it. Quantum is full with those little enhancements for driver-challenged databases, although in later times the improvement in drivers is rendering them mostly useless.

    Good vibes.

    Julen.