# Improved SQL Server Connection Adapter

**URL:** <https://www.ruby-forum.com/t/improved-sql-server-connection-adapter/112925>\
**Category:** Rails\
**Created:** [August 24, 2007, 3:29pm UTC](https://www.ruby-forum.com/t/improved-sql-server-connection-adapter/112925 "2007-08-24T15:29:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![riles01](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@riles01](https://www.ruby-forum.com/u/riles01)\
**Post date:** [August 24, 2007, 3:29pm UTC](https://www.ruby-forum.com/t/improved-sql-server-connection-adapter/112925/1 "2007-08-24T15:29:55Z")

</div>

I added a few additional options to the SQL Server connection adapter  
(sqlserver\_adapter.rb) in the /vendor/rails/activerecord/lib/  
active\_record/connection\_adapters/ folder. I’ve also used the updates  
Ryan Barton added to make the connector work with ActiveScaffold  
([http://groups.google.com/group/activescaffold/browse\_thread/thread/](http://groups.google.com/group/activescaffold/browse_thread/thread/)  
dc2320dc98064e95/51604a38878792ff?lnk=gst&q=sql  
+server&rnum=1#51604a38878792ff). The file is posted in the Files  
section of the ActiveScaffold group ([http://groups.google.com/group/](http://groups.google.com/group/)  
activescaffold/web/sqlserver\_adapter.rb).

You can now opt to use integrated security instead of a username and  
password, like so:

development:  
adapter: sqlserver  
database: test\_app\_development  
integrated: SSPI

# username: user

# password: pass

host: SQLDBDEV  
mode: DBI:ADO # Optional; this is hard-coded  
provider: SQLNCLI # Optional; if blank, defaults to SQLOLEDB

This has been tested with Edge Rails and has worked with everything  
I’ve thrown at it, but I don’t know about previous Rails versions.
