# Ruby ODBC error

**URL:** https://rubytalk.org/t/ruby-odbc-error/52710
**Category:** ruby-talk
**Created:** [6 April 2009 22:54 UTC](https://rubytalk.org/t/ruby-odbc-error/52710 "2009-04-06T22:54:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lrlebron](https://avatars.discourse-cdn.com/v4/letter/l/a8b319/32.png) [@lrlebron](https://rubytalk.org/u/lrlebron)
#### Post date: [6 April 2009 22:54 UTC](https://rubytalk.org/t/ruby-odbc-error/52710/1 "2009-04-06T22:54:55Z")

</div>

I am getting the following error when trying to connect to sql server  
via odbc from a customer's computer

OLE error code:800A0E7A in ADODB.Connection  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Provider cannot be found. It may not be properly installed.  
&nbsp;&nbsp;&nbsp;&nbsp;HRESULT error code:0x80020009  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exception occurred.

Here's a piece of the script

require 'odbc'  
require 'win32ole'

&nbsp;&nbsp;&nbsp;db = WIN32OLE.new("ADODB.Connection")  
&nbsp;&nbsp;db.open("Provider=SQLNCLI;Data Source=#{@server\_name};Database=#  
{@database};UID=#{@username};Pwd=#{@password};")

The script works from my computer. I have installed MDAC on the  
customer's computer,

Any help would be greatly appreciated.
