Re: newbie: CMD-line tutorial and Sybase SQLAnywhere

From: Andrus (andru..bjectstyle.org)
Date: Fri Aug 30 2002 - 08:00:56 EDT

  • Next message: Branko Kannenberg: "ServletConfiguration"

    Hi Tore,

    While Cayenne is tested with Sybase, Sybase SQL Anywhere is a different
    beast and we haven't tried it with Cayenne. So I would expect glitches with
    it. For instance, from the error you sent, I suspect that SQL Anywhere
    doesn't support column aliases (need to check the docs on that..).

    I guess we may handle such case (using aliases vs. full table names in
    queries) a little better in Cayenne's generic JdbcAdapter though. I guess I
    will file this as a bug and after this is fixed, you may try it with SQL
    Anywhere again.

    Andrus

    At 10:22 AM 8/30/2002 +0200, Tore Halset wrote:
    >Hello!
    >
    >I am using Sybase SQLANywhere throu ODBC. Cayenne nightly/2002-8-29.
    >
    >The modeler seem to work ok. The creation of AUTO_PK_SUPPORT from modeler
    >worked ok.
    >
    >Looks like the generated SQL are bad. Same error with SybaseAdapter and
    >JdbcAdapter.
    >
    >C:\javadev\cayennetest>c:\j2sdk1.4.0_01\jre\bin\java test.Main f
    >WARN DefaultOperationObserver: query exception
    >java.sql.SQLException: [Sybase][ODBC Driver][Adaptive Server
    >Anywhere]Syntax er
    >or or access violation: near 't0' in ..._ID FROM .GALLERY [t0] WHERE
    >UPPER(t0..
    >.
    > at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
    > at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
    > at sun.jdbc.odbc.JdbcOdbc.SQLPrepare(JdbcOdbc.java:4229)
    > at
    >sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection
    >java:470)
    > at
    >sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection
    >java:438)
    > at
    >org.objectstyle.cayenne.conn.ConnectionWrapper.prepareStatement(Conn
    >ctionWrapper.java:298)
    > at
    >org.objectstyle.cayenne.access.trans.QueryAssembler.createStatement(
    >ueryAssembler.java:133)
    > at
    >org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java
    >245)
    > at
    >org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.
    >ava:345)
    > at
    >org.objectstyle.cayenne.access.DataContext.performQueries(DataContex
    >.java:756)
    > at
    >org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.
    >ava:763)
    > at
    >org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.
    >ava:687)
    > at test.Main.findGallery(Main.java:74)
    > at test.Main.runTutorial(Main.java:44)
    > at test.Main.main(Main.java:36)
    >WARN DefaultOperationObserver: global exception
    >org.objectstyle.cayenne.CayenneRuntimeException: Query exception.
    > at
    >org.objectstyle.cayenne.access.SelectObserver.nextQueryException(Sel
    >ctObserver.java:154)
    > at
    >org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java
    >270)
    > at
    >org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.
    >ava:345)
    > at
    >org.objectstyle.cayenne.access.DataContext.performQueries(DataContex
    >.java:756)
    > at
    >org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.
    >ava:763)
    > at
    >org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.
    >ava:687)
    > at test.Main.findGallery(Main.java:74)
    > at test.Main.runTutorial(Main.java:44)
    > at test.Main.main(Main.java:36)



    This archive was generated by hypermail 2.0.0 : Fri Aug 30 2002 - 08:00:48 EDT