two sybase related issues

From: Uwe Krüger (uwe.kruege..ueller.de)
Date: Tue Jul 26 2005 - 06:18:52 EDT

  • Next message: Andrus Adamchik: "Re: Question Concerning XML - Was: M5 is out"

    Hi ,

    I use cayenne on a sybase database with the jTDS driver and I met two
    issues.

    first:
    When I call a stored procedure that return one ResultSet I don't get the
    result.
    (the procedure doesn't update anything)

    Due to fix of CAY-271 the behavior of the method performAction in
    ProcedureAction
    doesn't work for me anymore.

    The return value of the execute method indicate the form of the first
    ResultSet. (see JDK API )
    So, depend from the return of the execute method the ResultSet should be
    read appropriate as updateCount or as Result.
    it seems the getMoreResults is not reliable directly past the execute call

    see also:
    http://jtds.sourceforge.net/faq.html

    second:

    the sql type TINYINT is in sybase defined in a range from 0 up to 255
    If I do a SQLTemplate query cayenne creates an RowDesriptor from the
    ResultSet using
    the column type (-6) then map it to Byte.
    As long the value is less 128 its OK. But when the value is greater than
    127 the
    value is wrong.
    In MySQL it's also possible to define an unsigned tinyint (0-255).

    So, I think it's better to map tinyint to Short at least.

    Uwe



    This archive was generated by hypermail 2.0.0 : Tue Jul 26 2005 - 06:13:52 EDT