crystal-mysql icon indicating copy to clipboard operation
crystal-mysql copied to clipboard

call Store procedure

Open yuskamal opened this issue 6 years ago • 1 comments

how to call mysql store procedure and get results ?

yuskamal avatar Mar 03 '18 03:03 yuskamal

Hello, to add a bit more info to this issue as I believe I am seeing the same thing. When you try to call a store procedure using the mysql driver in the following way:

db.query "call new_procedure;" do |rs|
  rs.each do
    puts "hello"
  end
end

the following error is raised

can't return a result set in the given context (Exception)

I remember this also being an issue in a very old version of the Ruby MySQL driver

Cheers

drum445 avatar May 11 '18 21:05 drum445