How to connect to SQL Server 2005 database through

2019-03-03 09:30发布

问题:

How to connect to SQL Server 2005 database through Ruby in Windows

回答1:

I have luck using FreeTDS and TinyTDS on Linux. I prefer that path because messing with ODBC was a pain.

In addition, I recommend using the Sequel ORM, because it helps remove the task of dealing with different flavors of SQL, allowing us to concentrate on programming, not writing queries that are tied to a particular DBM.



回答2:

"Ruby, ADO, and SQLServer" is an example using Ruby and ADO to connect to and query an SQL Server database.

And "Using Ruby & SQL-DMO to Automate SQL Server Tasks" demonstrates how to use Ruby and SQL-DMO to automate server tasks.