Problems with dbi to sql server

I’m trying to figure out how to connect to sql server (2005 i think)

this program here, at first used to show the defaukt stuff, ODBC I
think.

DBI.available_drivers.each do |drv|
puts drv
DBI.data_sources(drv).each do |src|
puts " #{src}"
end
end

then I did the config/setup/install with config as shown below for the
dbi stuff I downloaded:

C:\ruby-sql\ruby-dbi>ruby setup.rb config –
with=dbi,dbd_ado,dbd_odbc,dbd_msql,d
bd_mysql,dbd_oracle
entering config phase…
config done.

now the original script above shows nothing, though I see what look
like drivers in a subdirectory called dbd off of my ruby lib and the
following call gives the error shown below:

dbh =
DBI.connect(‘dbi:ODBC:’+‘%q{DRIVER=SQLServer;SERVER=me.my.com;DATABASE=techie;Uid=me;Pwd=*mypass}’)

c:/ruby/lib/ruby/site_ruby/1.8/DBD/ODBC/ODBC.rb:95:in connect': IM002 (0) [Micr osoft][ODBC Driver Manager] Data source name not found and no default driver spe cified (DBI::DatabaseError) from c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:424:in connect’
from c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:215:in `connect’
from C:/rb-play/tst.rb:19

C:\rb-play>

[email protected] wrote:

I’m trying to figure out how to connect to sql server (2005 i think)

I regularly use ADO to connect to SQL Server databases:

David