method

set_identity_insert

rails latest stable - Class: ActiveRecord::ConnectionAdapters::SQLServerAdapter

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.2.6) is shown here.

set_identity_insert(table_name, enable = true)
private

No documentation available.

# File activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb, line 528
        def set_identity_insert(table_name, enable = true)
          execute "SET IDENTITY_INSERT #{table_name} #{enable ? 'ON' : 'OFF'}"
        rescue Exception => e
          raise ActiveRecordError, "IDENTITY_INSERT could not be turned #{enable ? 'ON' : 'OFF'} for table #{table_name}"  
        end