Force AR-JDBC to use UCS-2 string data types on MS SQL Server
-------------------------------------------------------------

                 Key: JRUBY-2953
                 URL: http://jira.codehaus.org/browse/JRUBY-2953
             Project: JRuby
          Issue Type: Improvement
          Components: ActiveRecord-JDBC
    Affects Versions: JRuby 1.1.3, ActiveRecord-JDBC 0.8.2
         Environment: JRuby 1.1.3, AR-JDBC 0.8.2, Rails 2.1.0, JDK 1.6.0_06 on 
Windows Server 2008, MS SQL Server 2005 SP2, Microsoft JDBC Driver 1.2 for SQL 
Server 2005
            Reporter: Chris Jeris
            Priority: Minor
         Attachments: ar-jdbc-mssql-ucs-2.patch

I would like to make it possible to make AR-JDBC choose to uniformly use the 
UCS-2 string data types (NCHAR, NVARCHAR, NTEXT) of MS SQL Server.  The 
attached patch appears to hack this in, by changing the way strings are quoted 
from '' to N'' and overriding the type_to_sql mapping to substitute N-type SQL 
types.  It seems superficially to work, and it passes the tests in 
mssql_simple_test.rb when I alter the configuration to use Microsoft's JDBC 
driver rather than jTDS (as that's what I'm using at my site).  Not sure if 
there are other necessary changes I missed.

I would like to make this behavior an option specified in config/database.yml, 
but don't know in what class the option should be set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email


Reply via email to