# Connecting to MS SQL Server 2000

**URL:** <https://www.ruby-forum.com/t/connecting-to-ms-sql-server-2000/170149>\
**Category:** Ruby\
**Created:** [June 12, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-2000/170149 "2009-06-12T21:47:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@jackster](https://www.ruby-forum.com/u/jackster)\
**Post date:** [June 12, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-2000/170149/1 "2009-06-12T21:47:04Z")

</div>

I need to be able to querry the database on a Microsoft SQL Server 2000  
from my Ruby script.

My only experience has been to connect to a MySQL database and I’m  
hoping that someone from this august forum might be able to point me in  
the right direction?

thanks

jack

---

<div class="post-metadata">

**Author:** ![jackster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@jackster](https://www.ruby-forum.com/u/jackster)\
**Post date:** [June 12, 2009, 10:04pm UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-2000/170149/2 "2009-06-12T22:04:51Z")

</div>

This may help. Its for 2005, though:

[https://www.ruby-forum.com/topic/125915](https://www.ruby-forum.com/topic/125915)

On Fri, Jun 12, 2009 at 3:47 PM, jackster the  
jackle[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

–  
Rilindo F.  
AOL Instant Messenger: rilindo  
Google Talk: removed\_email\_address@domain.invalid  
Web S.: [http://www.monzell.com](http://www.monzell.com)  
Primary: removed\_email\_address@domain.invalid  
Secondary: removed\_email\_address@domain.invalid  
"Rich bachelors should be heavily taxed. It is not fair that some men  
should be happier than others. – Oscar Wilde

---

<div class="post-metadata">

**Author:** ![jackster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@jackster](https://www.ruby-forum.com/u/jackster)\
**Post date:** [June 13, 2009, 1:39am UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-2000/170149/3 "2009-06-13T01:39:53Z")

</div>

On Fri, Jun 12, 2009 at 12:47 PM, jackster the jackle \<  
removed\_email\_address@domain.invalid\> wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

I have had good luck with the ODBC bindings here  
[ODBC Binding for Ruby](http://www.ch-werner.de/rubyodbc/). The hardest part would be getting  
FreeTDS  
setup and configured. Are you connecting from a non-Windows box to the  
SQL  
Server?

Scott

---

<div class="post-metadata">

**Author:** ![jackster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@jackster](https://www.ruby-forum.com/u/jackster)\
**Post date:** [June 13, 2009, 3:10am UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-2000/170149/4 "2009-06-13T03:10:40Z")

</div>

Yes, I’m running my Ruby script from a Linux box.

thanks alot

jack

Scott Lillibridge wrote:

> On Fri, Jun 12, 2009 at 12:47 PM, jackster the jackle \<  
> removed\_email\_address@domain.invalid\> wrote:
> 
> > –  
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> I have had good luck with the ODBC bindings here  
> [ODBC Binding for Ruby](http://www.ch-werner.de/rubyodbc/). The hardest part would be getting  
> FreeTDS  
> setup and configured. Are you connecting from a non-Windows box to the  
> SQL  
> Server?
> 
> Scott

---

<div class="post-metadata">

**Author:** ![jackster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@jackster](https://www.ruby-forum.com/u/jackster)\
**Post date:** [June 13, 2009, 3:08am UTC](https://www.ruby-forum.com/t/connecting-to-ms-sql-server-2000/170149/5 "2009-06-13T03:08:30Z")

</div>

jackster the jackle wrote:

> I need to be able to querry the database on a Microsoft SQL Server 2000  
> from my Ruby script.
> 
> My only experience has been to connect to a MySQL database and I’m  
> hoping that someone from this august forum might be able to point me in  
> the right direction?
> 
> thanks
> 
> jack

I frequently use win32ole and ADO to query SQL Server 2000 databases  
from a Windows machine.

> **[Ruby, ADO, and SQLServer](http://rubyonwindows.blogspot.com/2007/03/ruby-ado-and-sqlserver.html)**
>
> Ruby and ActiveX Data Objects (ADO) make working with Microsoft SQL Server databases simple. Here's a simple example of a class that manages...

That won’t help you if you’re on a non-Windows box.

David
