FYI, I had to also add in this line:
lambda {|r| r['type_name'] =~ /^datetime$/i}],

when the AR_TO_JDBC_TYPES is being initialized.  I dont' know exactly
why, but some of our sybase servers need it, whereas other sybase
servers don't need it.  All of the sybase servers run Sybase 12.5.3.
I have no clue why our production sybase server only has the datetime
type and our dev/qa environments has the datetime and date types.

Dean


On 5/15/07, Nick Sieger <[EMAIL PROTECTED]> wrote:
On 5/11/07, Dean Mao <[EMAIL PROTECTED]> wrote:
> Not sure if I'm using JRuby properly, but I tried to use it today with
> Sybase using their jdbc3 driver and activerecord-jdbc 0.3.1.  It
> failed in JdbcTypeConverter.choose_type.  I sorta hack fixed it by
> adding in this line inside of JdbcTypeConverter.initialize:
>
> @types.each {|type| type['type_name'] = type['local_type_name'] if
> type['local_type_name'] != nil}
>
> For some reason the
> connection.getMetaData().getTypeInfo().getMetaData().getColumnName(x)
> returns 'local_type_name' instead of the expected 'type_name' that is
> used throughout jdbc_adapter.rb.

Thanks for the report, I've committed a slightly modified version of
this to activerecord-jdbc trunk.

/Nick

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to