griff/activerecord-jdbcsqlanywhere-adapter — Issue #3: exec stored proc returns row count, not result set
Author: rob99
Created: 2011-11-04 06:43:49+00:00
State: open

I've found that if a proc does something else before executing a SELECT, then the adapter reports a row count as opposed to a subsequent result set.

```sql
create procedure deleteme1
as
select * from sysobjects
go

create procedure deleteme2
as
select * into #tmp from sysobjects
select * from #tmp
go
```

```ruby
#...
ActiveRecord::Base.establish_connection CONFIG
puts ActiveRecord::Base.connection.execute("exec deleteme1").inspect
#=> prints a result set
puts ActiveRecord::Base.connection.execute("deleteme2").inspect
#=> prints a row count
```

I'm pretty sure this works with other adapters. Will check....