module Sequel::ADO::MSSQL::DatabaseMethods

  1. lib/sequel/adapters/ado/mssql.rb

Methods

Public Instance

  1. execute_dui

Public Instance methods

execute_dui(sql, opts=OPTS)
[show source]
   # File lib/sequel/adapters/ado/mssql.rb
11 def execute_dui(sql, opts=OPTS)
12   return super unless @opts[:provider]
13   synchronize(opts[:server]) do |conn|
14     begin
15       sql = "SET NOCOUNT ON; #{sql}; SELECT @@ROWCOUNT"
16       rst = log_connection_yield(sql, conn){conn.Execute(sql)}
17       rst.GetRows[0][0]
18     rescue ::WIN32OLERuntimeError => e
19       raise_error(e)
20     end
21   end
22 end