helo all,
I am trying to connect to SQL server through ODBC.
Steps
1) I alreday have ODBC available.
2) Created a DSN and tested with Test connection there.
3) verified C:\IRBmain Require 'ODBC' true.
4) I created a scripts according to the examples.
require 'watir'
require 'ODBC'
include 'watir'
require 'Driver'
#~ # Connect to the Databse
conn = ODBC::connect('Myvalue','user','password')
#~ # get the from the table
h = conn.run(SELECT * FROM tableName where ssn = 'ssn')
#~ # get the ecah field value and prints to the log.
h.each do |row|
puts row
end
it worked and retrieved the values one time.
Now it is not idetifying the ODBC anymore. i am getting Load error.
ruby DBconnect.rb
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/ODBC.so: 127: The specified
procedure could not be found.
- Init_ODBC (LoadError)
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/ODBC.so from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from DBconnect.rb:2
Please can you help me.
do i have to disconnect? if it is please tell me how May be
ODBC::disconnect ?
Thanks,
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general