opscode-cookbooks/database — pull request #38 by kppullin (2013-07-04 07:59:01+00:00)
Title: Fixed issue with multi-statement SQL Server queries

When issuing multi-statement sql queries, TinyTds requires iterating through the entire result set via the `each` method.

Using the `do` method results in undefined behavior (in my case only the first ~230 insert statements succeeded and then TinyTds returned without an error).

This patch simply changes the `db.execute(@new_resource.sql_query).do` line to `db.execute(@new_resource.sql_query).each`.

See the `TinyTds::Result Usage` section @ https://github.com/rails-sqlserver/tiny_tds for further details.