From noreply at rubyforge.org Thu May 14 14:08:31 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 May 2009 14:08:31 -0400 (EDT) Subject: [Jruby-extras-devel] [ jruby-extras-Bugs-25901 ] JDBC MSSQL Adapter does not handle "select ... into ..." statements Message-ID: <20090514180831.30FA31598076@rubyforge.org> Bugs item #25901, was opened at 2009-05-14 14:08 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25901&group_id=2014 Category: AR-JDBC Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: JDBC MSSQL Adapter does not handle "select ... into ..." statements Initial Comment: if you call the execute method with a sql statement of the form: "select ... into ..." the MSSQL adapter thinks it's a select statement and ultimately calls @connection.execute_query(...) the error produced is: ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError: The statement did not return a result set. to fix, simply added this to the _execute method in jdbc_mssql.rb def _execute(sql, name = nil) if sql.lstrip =~ /select.+[\s\r\n]into[\s\r\n]/im @connection.execute_update(sql) elsif ... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25901&group_id=2014 From noreply at rubyforge.org Thu May 14 14:46:15 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 May 2009 14:46:15 -0400 (EDT) Subject: [Jruby-extras-devel] [ jruby-extras-Bugs-25902 ] JDBC MSSQL Adapter incorrectly specifies column width for uniqueidentifier Message-ID: <20090514184616.0F425159802E@rubyforge.org> Bugs item #25902, was opened at 2009-05-14 14:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25902&group_id=2014 Category: AR-JDBC Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: JDBC MSSQL Adapter incorrectly specifies column width for uniqueidentifier Initial Comment: if you use migrations and specify a column with datatype of 'uniqueidentifier', the resulting SQL looks like " uniqueidentifier(36)" to fix, I just tweaked tsql_helper.rb def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc: return 'uniqueidentifier' if (type.to_s == 'uniqueidentifier') ... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25902&group_id=2014 From noreply at rubyforge.org Thu May 14 16:03:37 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 May 2009 16:03:37 -0400 (EDT) Subject: [Jruby-extras-devel] [ jruby-extras-Bugs-25902 ] JDBC MSSQL Adapter incorrectly specifies column width for uniqueidentifier Message-ID: <20090514200337.D00C01858127@rubyforge.org> Bugs item #25902, was opened at 2009-05-14 13:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25902&group_id=2014 Category: AR-JDBC Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: JDBC MSSQL Adapter incorrectly specifies column width for uniqueidentifier Initial Comment: if you use migrations and specify a column with datatype of 'uniqueidentifier', the resulting SQL looks like " uniqueidentifier(36)" to fix, I just tweaked tsql_helper.rb def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc: return 'uniqueidentifier' if (type.to_s == 'uniqueidentifier') ... ---------------------------------------------------------------------- Comment By: Nick Sieger (nicksieger) Date: 2009-05-14 15:03 Message: Hi, we no longer use this tracker to track bugs here. Can you please file a copy of this bug at http://kenai.com/jira/browse/ACTIVERECORD_JDBC ? Thanks! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25902&group_id=2014 From noreply at rubyforge.org Thu May 14 16:04:38 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 14 May 2009 16:04:38 -0400 (EDT) Subject: [Jruby-extras-devel] [ jruby-extras-Bugs-25901 ] JDBC MSSQL Adapter does not handle "select ... into ..." statements Message-ID: <20090514200438.D90261779926@rubyforge.org> Bugs item #25901, was opened at 2009-05-14 13:08 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25901&group_id=2014 Category: AR-JDBC Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) >Summary: JDBC MSSQL Adapter does not handle "select ... into ..." statements Initial Comment: if you call the execute method with a sql statement of the form: "select ... into ..." the MSSQL adapter thinks it's a select statement and ultimately calls @connection.execute_query(...) the error produced is: ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError: The statement did not return a result set. to fix, simply added this to the _execute method in jdbc_mssql.rb def _execute(sql, name = nil) if sql.lstrip =~ /select.+[\s\r\n]into[\s\r\n]/im @connection.execute_update(sql) elsif ... ---------------------------------------------------------------------- Comment By: Nick Sieger (nicksieger) Date: 2009-05-14 15:04 Message: Hi, we no longer use this tracker to track bugs here. Can you please file a copy of this bug at http://kenai.com/jira/browse/ACTIVERECORD_JDBC ? Thanks! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7857&aid=25901&group_id=2014