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 <new table> ..."

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
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to