views:

25

answers:

0

I have use activerecord to access data from db. It works fine in localhost but when I tried it on another server, I get the following errors:

ActiveRecord::StatementInvalid (Mysql::Error: PROCEDURE db_name.proc_spName can't return a result set in the given context: CALL proc_spName(............)):
    /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'
    /vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:310:in `execute'
    /app/controllers/keywordprocessor_controller.rb:306:in `result'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `send'

BTW, below is the line where I get the following errors

sql = "CALL proc_getresults"
res = ActiveRecord::Base.connection.execute(sql)

Any ideas would be greatly appreciated..