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 <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 ...
----------------------------------------------------------------------
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